[Common] refactoring
This commit is contained in:
parent
e440e7d5af
commit
f3f7536da0
|
@ -705,7 +705,7 @@ Common.Utils.asyncCall = function (callback, scope, args) {
|
|||
(new Promise(function (resolve, reject) {
|
||||
resolve();
|
||||
})).then(function () {
|
||||
callback.apply(scope, args);
|
||||
callback.call(scope, args);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -300,9 +300,7 @@ define([
|
|||
|
||||
|
||||
Common.NotificationCenter.on('app:ready', function(mode) {
|
||||
(new Promise(function (accept, reject) {
|
||||
accept(mode);
|
||||
})).then(onAppReady.bind(me));
|
||||
Common.Utils.asyncCall(onAppReady, me, mode);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue