diff --git a/src/handleSubmit.ts b/src/handleSubmit.ts index ba2b684..e81e07f 100644 --- a/src/handleSubmit.ts +++ b/src/handleSubmit.ts @@ -111,7 +111,10 @@ export const handleSubmit = async ( focused: true, }); - if (typeof browser !== 'undefined') { + if ( + typeof browser !== 'undefined' && + typeof browser.tabs?.executeScript === 'function' + ) { await browser.tabs.executeScript(tab.id, { file: '/dist/injectedScript.js', });