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

error when trying to determine version for checking whether to useCssLoadPatch #416

Open
nbrustein opened this issue Feb 5, 2018 · 1 comment

Comments

@nbrustein
Copy link

In the wild, on line 913 of ocLazyLoad.js, a few of our users hit the following error:

null is not an object (evaluating 'v[1]')

The relevant line of code is:

var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));

We've seen this with the following user agents:

  • Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/10.0 Safari/602.1.31
  • Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12

It seems like window.navigator.platform is reporting that this device is an iOS device, but window.navigator.appVersion is not in the expected format.

@booleanbetrayal
Copy link
Contributor

booleanbetrayal commented Feb 5, 2018

@ocombe / @nbrustein - Made a quick inline-PR to handle a fall-through scenario for when user-agent strings + platform combinations are unknown. #417

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