1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-29 17:38:04 +01:00

only send message when there is a page on tab

This commit is contained in:
Kyle Spearrin 2018-01-12 16:34:51 -05:00
parent 64a27e5fd9
commit c15a2f5747

View File

@ -97,11 +97,10 @@ class BrowserApi {
}
const t = win.tabs[tab.index];
if (!t.page) {
return Promise.reject('No page on this tab.');
if (t.page) {
t.page.dispatchMessage('bitwarden', obj);
}
t.page.dispatchMessage('bitwarden', obj);
return Promise.resolve();
}
}