kaimallea/isMobile

Error 'split not a function' in iOS 9.3.2 Safari

bobliwang opened this issue · 3 comments

Hi Kai,
We ran into error as 'split not a function' in iOS 9.3.2 Safari. In javascript, navigator.userAgent returns false as a boolean value, which doens't have 'split' function while it was called later. Temporarily we changed code in version 0.4.1 as below from:
var ua = userAgent || navigator.userAgent
to:
var ua = userAgent || navigator.userAgent || '';
Just let you know.

Thanks
Li

Thanks! Pull request w/ test? 😃

p-j commented

Would love to submit a PR with tests, but your build system is broken at the moment with a fresh install.
Do you intend to maintain this project or not ?

Fixed by #77