mrdoob/system.js

iPhone not detected as running on iOS

jdalton opened this issue · 2 comments

You have

navigator.userAgent.match( /ipod/i ) || navigator.userAgent.match( /ipad/i )

You should tighten up that code and use 1 regexp, something like:

var ua = navigator.userAgent;
if ( /iP[ao]d|iPhone/.test(ua) ) {
  // ...
}

Changed too. Thanks!

Also changed it to use regexp.test(string). Thanks for the tip :)