From d5962a972d90641696fd5e86befd9e4be3f78d8a Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 24 May 2012 15:24:13 +0000 Subject: [PATCH] fix Ox.typeOf for Mobile Safari --- source/Ox/js/Type.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 44e8ff2a..846c46cf 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -335,7 +335,8 @@ Ox.typeOf 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(); };