Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabzila.js compareVersion function doesn't recognize jQuery 1.10.x #1435

Closed
hannosch opened this issue Nov 24, 2013 · 2 comments
Closed

tabzila.js compareVersion function doesn't recognize jQuery 1.10.x #1435

hannosch opened this issue Nov 24, 2013 · 2 comments

Comments

@hannosch
Copy link
Contributor

In

var compareVersion = function (a, b) {
there is a compareVersion function which tries to determine if a new enough jQuery version was already loaded by the site. The minimumJQuery is currently defined as '1.7.1'. My site had already loaded '1.10.2'. The compareVersion doesn't cast the version strings to numbers, but compares strings. Which leads to:

"10" > "7"
false
"10" < "7"
true

where as usually you'd get:

"9" > "7"
true
"9" < "7"
false

Maybe the function should add something like parseInt(a[i], 10) to the comparison.

@alexgibson
Copy link
Member

Thanks for the report, @hannosch!

I've filed a bug for this here: https://bugzilla.mozilla.org/show_bug.cgi?id=942745

We'll look to get this resolved asap.

@alexgibson
Copy link
Member

Merged in #1436

Thanks again @hannosch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants