From: John Resig Date: Tue, 3 Jul 2007 13:19:09 +0000 (+0000) Subject: The browser.version check was causing browsers with undetected useragents to die... X-Git-Tag: 1.1.3.1~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0cf71332a1cdfac2234a758bc350bcd1d723e9d;p=jquery.git The browser.version check was causing browsers with undetected useragents to die. This, at least, makes it fail gracefully. --- diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 1d0d28133..e846e4dff 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1811,7 +1811,7 @@ new function() { // Figure out what browser is being used jQuery.browser = { - version: b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1], + version: (b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b),