diff options
-rw-r--r-- | app/scripts/controllers/provider-approval.js | 28 | ||||
-rw-r--r-- | old-ui/app/app.js | 2 |
2 files changed, 16 insertions, 14 deletions
diff --git a/app/scripts/controllers/provider-approval.js b/app/scripts/controllers/provider-approval.js index b8cf04341..2c9182b52 100644 --- a/app/scripts/controllers/provider-approval.js +++ b/app/scripts/controllers/provider-approval.js @@ -28,19 +28,21 @@ class ProviderApprovalController { if (platform && platform.addMessageListener) { platform.addMessageListener(({ action = '', force, origin, siteTitle, siteImage }, { tab }) => { - switch (action) { - case 'init-provider-request': - this._handleProviderRequest(origin, siteTitle, siteImage, force, tab.id) - break - case 'init-is-approved': - this._handleIsApproved(origin, tab.id) - break - case 'init-is-unlocked': - this._handleIsUnlocked(tab.id) - break - case 'init-privacy-request': - this._handlePrivacyRequest(tab.id) - break + if (tab && tab.id) { + switch (action) { + case 'init-provider-request': + this._handleProviderRequest(origin, siteTitle, siteImage, force, tab.id) + break + case 'init-is-approved': + this._handleIsApproved(origin, tab.id) + break + case 'init-is-unlocked': + this._handleIsUnlocked(tab.id) + break + case 'init-privacy-request': + this._handlePrivacyRequest(tab.id) + break + } } }) } diff --git a/old-ui/app/app.js b/old-ui/app/app.js index f694693f5..e81899538 100644 --- a/old-ui/app/app.js +++ b/old-ui/app/app.js @@ -219,7 +219,7 @@ App.prototype.renderPrimary = function () { if (providerRequests && providerRequests.length > 0) { log.debug('rendering provider API approval screen') - return h(ProviderApproval, { origin: providerRequests[0].origin }) + return h(ProviderApproval, { origin: providerRequests[0].origin, tabID: providerRequests[0].tabID }) } // show current view |