ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

computing iOSVersion throws error when doing a "Request Desktop Site" on iPhone Safari #415

Closed arbughiu closed 6 years ago

arbughiu commented 6 years ago

https://github.com/ocombe/ocLazyLoad/blob/c282f8f47736c195a4079024f62f3c9e16420619/src/ocLazyLoad.loaders.common.js#L96

Issue: Computing the user agent version while browsing on an iPhone in desktop mode instead of mobile mode.

Steps to reproduce:

  1. Open a URL that uses ocLazyLoad an iPhone.
  2. Request Desktop Site (i.e. hold down the refresh button on the iPhone until this option appears)
  3. See error in console

Tested on:

Example URL where problem occurs: https://www.audi.co.uk/about-audi/contact-us/arrange-a-test-drive/test-drive-form.html

Please note that I was not able to replicate the issue using a browser other than Safari on the iPhone.

arbughiu commented 6 years ago

I just realised that this is a duplicate. See https://github.com/ocombe/ocLazyLoad/issues/302