Skip to content

Commit

Permalink
fix: prevent authorization requests from incorrect url when pages are…
Browse files Browse the repository at this point in the history
… pre-rendered
  • Loading branch information
F-OBrien authored and adamdossa committed Jan 25, 2024
1 parent 881e285 commit 75a42ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/background/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function handler<TMessageType extends PolyMessageTypes>(
const sender = port.sender as chrome.runtime.MessageSender;
const from = isExtension
? PORTS.EXTENSION
: (sender.tab && sender.tab.url) || sender.url || '<unknown>';
: sender.url || sender.tab?.url || '<unknown>';
const source = `${from}: ${id}: ${message}`;

console.log(` [in] ${source}`); // :: ${JSON.stringify(request)}`);
Expand Down

0 comments on commit 75a42ed

Please sign in to comment.