[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) {
resolve();
})).then(function () {
callback.apply(scope, args);
callback.call(scope, args);
});
}

View file

@ -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);
});
},