[Common] refactoring

This commit is contained in:
Maxim Kadushkin 2017-05-04 15:26:32 +03:00
parent e440e7d5af
commit f3f7536da0
2 changed files with 2 additions and 4 deletions

View file

@ -705,7 +705,7 @@ Common.Utils.asyncCall = function (callback, scope, args) {
(new Promise(function (resolve, reject) { (new Promise(function (resolve, reject) {
resolve(); resolve();
})).then(function () { })).then(function () {
callback.apply(scope, args); callback.call(scope, args);
}); });
} }

View file

@ -300,9 +300,7 @@ define([
Common.NotificationCenter.on('app:ready', function(mode) { Common.NotificationCenter.on('app:ready', function(mode) {
(new Promise(function (accept, reject) { Common.Utils.asyncCall(onAppReady, me, mode);
accept(mode);
})).then(onAppReady.bind(me));
}); });
}, },