Result:
Cannot read property "match" of null on line 28 in detect-mobile.js
It seems that the "userAgent"-property within the SmartPhone-object is null.
The reason is, that (tested under webkit & firefox) console.log(typeof window); prints object and not function, and therefore the user Agent will not be set. I don't know why this bug has not been detected before, but the solution is simple:
Hey,
I tested this simply:
Result: Cannot read property "match" of null on line 28 in detect-mobile.js
It seems that the "userAgent"-property within the SmartPhone-object is null. The reason is, that (tested under webkit & firefox)
console.log(typeof window);
printsobject
and notfunction
, and therefore the user Agent will not be set. I don't know why this bug has not been detected before, but the solution is simple:On line 111, change:
to: