fix Ox.typeOf for Mobile Safari

This commit is contained in:
rlx 2012-05-24 15:16:21 +00:00
parent e5b46da0d5
commit e2330a0e2e

View file

@ -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();
};