From 511b2c2b209df4e5778b0ef4f2b30015eb680fde Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 10 Jan 2019 14:21:05 -0700 Subject: [PATCH] Return the promise if available --- api/js/framework/fw_base.js | 5 ++--- api/js/framework/fw_desktop.js | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/js/framework/fw_base.js b/api/js/framework/fw_base.js index 65c879f26a..457781d7ca 100644 --- a/api/js/framework/fw_base.js +++ b/api/js/framework/fw_base.js @@ -726,10 +726,9 @@ var fw_base = (function(){ "use strict"; return Class.extend( if (_app != this.activeApp) { // tab not yet loaded, load it now - if (!_app.browser.currentLocation && !_app.browser.iframe) + if (!_app.browser || !_app.browser.currentLocation && !_app.browser.iframe) { - this.applicationTabNavigate(_app, _app.indexUrl); - return; + return this.applicationTabNavigate(_app, _app.indexUrl); } this.activeApp = _app; diff --git a/api/js/framework/fw_desktop.js b/api/js/framework/fw_desktop.js index 23fcd79472..2413f0facc 100644 --- a/api/js/framework/fw_desktop.js +++ b/api/js/framework/fw_desktop.js @@ -269,7 +269,7 @@ */ setActiveApp: function(_app) { - this._super.apply(this, arguments); + var result = this._super.apply(this, arguments); if (_app == _app.parentFw.activeApp) { @@ -296,6 +296,8 @@ framework.getToggleSidebarState(); framework.activeApp.browser.callResizeHandler(); } + + return result; }, /**