fix Ox.typeOf for Mobile Safari
This commit is contained in:
parent
e5b46da0d5
commit
e2330a0e2e
1 changed files with 3 additions and 1 deletions
|
@ -335,5 +335,7 @@ Ox.typeOf <f> Returns the type of a value
|
|||
'undefined'
|
||||
@*/
|
||||
Ox.typeOf = function(val) {
|
||||
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase();
|
||||
// Mobile Safari doesn't like undefined here
|
||||
return val === void 0 ? 'undefined'
|
||||
: Object.prototype.toString.call(val).slice(8, -1).toLowerCase();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue