mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
[PM-7747] add timeout to safari sendMessageWithResponse (#9082)
* add timeout to safari sendMessageWithResponse * change to query views instead of sending message
This commit is contained in:
parent
da144410e8
commit
c69cc37716
@ -163,6 +163,10 @@ export abstract class BrowserPlatformUtilsService implements PlatformUtilsServic
|
||||
* the view is open.
|
||||
*/
|
||||
async isViewOpen(): Promise<boolean> {
|
||||
if (this.isSafari()) {
|
||||
// Query views on safari since chrome.runtime.sendMessage does not timeout and will hang.
|
||||
return BrowserApi.isPopupOpen();
|
||||
}
|
||||
return Boolean(await BrowserApi.sendMessageWithResponse("checkVaultPopupHeartbeat"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user