Skip to content

Commit

Permalink
update: include origin sender to payload
Browse files Browse the repository at this point in the history
  • Loading branch information
FME849 committed Jun 13, 2024
1 parent e6b4b07 commit 4311cf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/chrome/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export class ChromeKernel<
chrome.runtime.onConnect.addListener((port) => {
const channelId = port.name as ChannelId;
port.onMessage.addListener((message, port) => {
if (!message.sender) {
message['sender'] = port.sender;
}
this.execute(channelId, message, (payload) => {
port.postMessage(payload);
});
Expand Down

0 comments on commit 4311cf1

Please sign in to comment.