ocombe / ocLazyLoad

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

Incorrect User-agent sniffing code for PhantomJS #222

Closed gildas-lormeau closed 9 years ago

gildas-lormeau commented 9 years ago

This line of code var versionMatch = ua.match(/version\/([\.\d]+)/i); from ocLazyLoad.loaders.common.js crashes in PhantomJS because the regular expresssion does not match anything.

Isn't it impossible to test the feature instead of doing UA sniffing that will fail inevitably in any future unknown browser?

gildas-lormeau commented 9 years ago

Sorry, I was testing an old version...