diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 0afe4a7ff..0d6ae74f9 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -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); }); } diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index f82f802d8..40efd54d3 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -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); }); },