diff --git a/packages/core/src/background/handlers/index.ts b/packages/core/src/background/handlers/index.ts index c3b14645..68e5926f 100644 --- a/packages/core/src/background/handlers/index.ts +++ b/packages/core/src/background/handlers/index.ts @@ -18,7 +18,7 @@ export default function handler( const sender = port.sender as chrome.runtime.MessageSender; const from = isExtension ? PORTS.EXTENSION - : (sender.tab && sender.tab.url) || sender.url || ''; + : sender.url || sender.tab?.url || ''; const source = `${from}: ${id}: ${message}`; console.log(` [in] ${source}`); // :: ${JSON.stringify(request)}`);