only send message when there is a page on tab
This commit is contained in:
parent
64a27e5fd9
commit
c15a2f5747
|
@ -97,11 +97,10 @@ class BrowserApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
const t = win.tabs[tab.index];
|
const t = win.tabs[tab.index];
|
||||||
if (!t.page) {
|
if (t.page) {
|
||||||
return Promise.reject('No page on this tab.');
|
t.page.dispatchMessage('bitwarden', obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
t.page.dispatchMessage('bitwarden', obj);
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue