Skip to content

Commit

Permalink
Accepting ipc events without senderId
Browse files Browse the repository at this point in the history
Since the property has been removed with Electron 28
  • Loading branch information
pbi-qfs authored Nov 15, 2023
1 parent c258862 commit 0b8484d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function metaToError (meta: { type: 'error', value: any, members: ObjectMember[]

function handleMessage (channel: string, handler: Function) {
ipcRenderer.on(channel, (event, passedContextId, id, ...args) => {
if (event.senderId !== 0) {
if (event.senderId !== 0 && event.senderId !== undefined) {
console.error(`Message ${channel} sent by unexpected WebContents (${event.senderId})`);
return;
}
Expand Down

0 comments on commit 0b8484d

Please sign in to comment.