diff --git a/lib/util.js b/lib/util.js index 242144fa..a609a2f5 100644 --- a/lib/util.js +++ b/lib/util.js @@ -731,10 +731,8 @@ var ret, func = obj && obj[name]; - if (func) { - func = func.bind(obj); - ret = exec(func, arg); - } + if (func) + func = func.apply(obj, arg); return ret; }; @@ -953,7 +951,7 @@ this.time = function(name) { var console = Scope.console; - Util.exec.ifExist(console, 'time', name); + Util.exec.ifExist(console, 'time', [name]); return this; }; @@ -965,7 +963,7 @@ this.timeEnd = function(name) { var console = Scope.console; - Util.exec.ifExist(console, 'timeEnd', name); + Util.exec.ifExist(console, 'timeEnd', [name]); return this; };