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