Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#3179 closed enhancement (fixed)

jQuery.browser.version fallback

Reported by: flesler Owned by: flesler
Priority: minor Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description

Hi, I noted that on jQuery, when it calculates jQuery.browser.version and not matches Mozilla, MSIE, Opera or Webkit, it puts the undefined value.

That would of no harm, but Digg.com (on digg.js) uses this value as version.split('.'), so non-recognized browsers trigger a JS error, my suggestion is to change [])[1] to at least:

[0,"1.0"])[1]

or:

userAgent.match(/\/([\d.]+)/))[1]

So 'version' gets assigned a meaningful value. This would benefit new browsers.

Óscar Toledo G.

Change History (2)

comment:1 Changed 11 years ago by flesler

need: PatchCommit
Owner: set to flesler
Status: newassigned

comment:2 Changed 11 years ago by flesler

Resolution: fixed
Status: assignedclosed

Added at [5791].

Note: See TracTickets for help on using tickets.