diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 8da157ff..a1586729 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -7,11 +7,16 @@ Ox.isArguments Tests if a value is an arguments "array" > Ox.isArguments((function() { return arguments; }())) true @*/ -Ox.isArguments = /MSIE/.test(navigator.userAgent) ? function(val) { - return !!(val && Object.hasOwnProperty.call(val, 'callee')); -} : function(val) { +Ox.isArguments = function(val) { return !!(val && val.toString() == '[object Arguments]'); } +if (!(function() { + return Ox.isArguments(arguments); +}())) { + Ox.isArguments = function(val) { + return !!(val && Object.hasOwnProperty.call(val, 'callee')); + }; +} /*@ Ox.isArray Tests if a value is an array