JavaScript error on all pages in non-Fx browsers

RESOLVED FIXED

Status

www.mozilla.org
Pages & Content
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: jpetto, Assigned: jpetto)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

44 bytes, text/x-github-pull-request
Details | Review | Splinter Review
(Assignee)

Description

10 months ago
Error message:

Uncaught TypeError: Cannot read property '1' of null

Error line:

var userVerArr = userVer.match(/^(\d+(?:\.\d+){1,2})/)[1].split(".");

https://github.com/mozilla/bedrock/blob/master/media/js/base/mozilla-client.js#L194

Looks like the bug is here:

https://github.com/mozilla/bedrock/blob/master/media/js/base/mozilla-notification-banner-init.js#L74

I think it should be:

if (client.isFirefoxDesktop) {
(Assignee)

Updated

10 months ago
Assignee: nobody → jon
(Assignee)

Comment 1

10 months ago
Looks like this bug is also present on the recently updated plugin check JS:

https://github.com/mozilla/bedrock/blob/master/media/js/plugincheck/plugincheck-update.js#L11
(Assignee)

Comment 2

10 months ago
Created attachment 8895109 [details] [review]
GitHub PR

Comment 3

10 months ago
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/926d25babad2b46ca9c3f44e98368faa22d12539
[fix bug 1388535] Fix JS error on banner init and plugincheck.

https://github.com/mozilla/bedrock/commit/ce64270335adf88e3bb0a7a138c275bf0a6c747a
Merge pull request #5040 from jpetto/bug-1388535-fix-banner-init-js-bug

[fix bug 1388535] Fix JS error on banner init and plugincheck.

Updated

10 months ago
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.