From ec12eddfba26f37ee86bed4469156b21695f8903 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 25 May 2012 19:46:02 +0200 Subject: [PATCH] use Ox.typeOf --- source/Ox.UI/js/Core/Ox.API.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Core/Ox.API.js b/source/Ox.UI/js/Core/Ox.API.js index aae66f50..943a15cf 100644 --- a/source/Ox.UI/js/Core/Ox.API.js +++ b/source/Ox.UI/js/Core/Ox.API.js @@ -48,11 +48,12 @@ Ox.API = function(options, callback) { that[key] = function(/*data, age, callback*/) { var data = {}, age = -1, callback = null; Ox.forEach(arguments, function(argument) { - if (Ox.isObject(argument)) { + var type = Ox.typeOf(argument); + if (type == 'object') { data = argument; - } else if (Ox.isNumber(argument)) { + } else if (type == 'number') { age = argument; - } else if (Ox.isFunction(argument)) { + } else if (type == 'function') { callback = argument; } });