aboutsummaryrefslogtreecommitdiffstats
path: root/src/jquery/jquery.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-07-03 13:19:09 +0000
committerJohn Resig <jeresig@gmail.com>2007-07-03 13:19:09 +0000
commitb0cf71332a1cdfac2234a758bc350bcd1d723e9d (patch)
treefa0b32422c74fce5f6487c053d2f6b46932fefcd /src/jquery/jquery.js
parentb9a8e65576615974228e493155c8c85dc25f09d8 (diff)
downloadjquery-b0cf71332a1cdfac2234a758bc350bcd1d723e9d.tar.gz
jquery-b0cf71332a1cdfac2234a758bc350bcd1d723e9d.zip
The browser.version check was causing browsers with undetected useragents to die. This, at least, makes it fail gracefully.
Diffstat (limited to 'src/jquery/jquery.js')
-rw-r--r--src/jquery/jquery.js2
1 files changed, 1 insertions, 1 deletions
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),