diff --git a/apps/browser/src/autofill/utils/index.ts b/apps/browser/src/autofill/utils/index.ts index d62013b161..ad9fa3a9a8 100644 --- a/apps/browser/src/autofill/utils/index.ts +++ b/apps/browser/src/autofill/utils/index.ts @@ -105,7 +105,7 @@ export async function sendExtensionMessage( command: string, options: Record = {}, ): Promise { - if (typeof browser !== "undefined") { + if (typeof browser?.runtime?.sendMessage !== "undefined") { return browser.runtime.sendMessage({ command, ...options }); }