The browser.version check was causing browsers with undetected useragents to die. This, at least, makes it fail gracefully.

This commit is contained in:
John Resig 2007-07-03 13:19:09 +00:00
parent b9a8e65576
commit b0cf71332a

View File

@ -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),