From cef11df838cef0a09990700818154ff08f04812c Mon Sep 17 00:00:00 2001 From: John Resig Date: Tue, 4 Jul 2006 01:23:18 +0000 Subject: [PATCH 1/1] Help to squelch unnecessary Mozilla exceptions. --- ajax/ajax.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ajax/ajax.js b/ajax/ajax.js index af80810..f6a1d9e 100644 --- a/ajax/ajax.js +++ b/ajax/ajax.js @@ -170,9 +170,12 @@ jQuery.ajax.active = 0; // Determines if an XMLHttpRequest was successful or not jQuery.httpSuccess = function(r) { - return r.status ? - ( r.status >= 200 && r.status < 300 ) || r.status == 304 : - location.protocol == "file:"; + try { + return r.status ? + ( r.status >= 200 && r.status < 300 ) || r.status == 304 : + location.protocol == "file:"; + } catch(e){} + return false; }; // Get the data out of an XMLHttpRequest. -- 1.7.10.4