mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[PM-11519] browser global reference triggering an error when sending an extension message (#10819)
This commit is contained in:
@@ -105,7 +105,7 @@ export async function sendExtensionMessage(
|
|||||||
command: string,
|
command: string,
|
||||||
options: Record<string, any> = {},
|
options: Record<string, any> = {},
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
if (typeof browser !== "undefined") {
|
if (typeof browser?.runtime?.sendMessage !== "undefined") {
|
||||||
return browser.runtime.sendMessage({ command, ...options });
|
return browser.runtime.sendMessage({ command, ...options });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user