mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
feature(util) ifExist: args -> [args]
This commit is contained in:
parent
c540036319
commit
b17682fb6e
1 changed files with 4 additions and 6 deletions
10
lib/util.js
10
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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue