From 228a5cef31b73416adca8a9f05b46a9ecd27aeac Mon Sep 17 00:00:00 2001 From: rafael-aero Date: Thu, 7 Oct 2021 18:13:32 +0200 Subject: [PATCH] set missing return value https://github.com/electron/electron/issues/31321 --- ElectronNET.Host/api/ipc.js | 3 +++ ElectronNET.Host/api/ipc.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ElectronNET.Host/api/ipc.js b/ElectronNET.Host/api/ipc.js index a8e10fe..dfa42f4 100644 --- a/ElectronNET.Host/api/ipc.js +++ b/ElectronNET.Host/api/ipc.js @@ -7,6 +7,7 @@ module.exports = (socket) => { electron_1.ipcMain.on(channel, (event, args) => { event.preventDefault(); electronSocket.emit(channel, [args]); + event.returnValue = null; }); }); socket.on('registerIpcMainChannelWithId', (channel) => { @@ -16,6 +17,7 @@ module.exports = (socket) => { let wc = electron_1.webContents.fromId(wcId); let bw = electron_1.BrowserWindow.fromWebContents(wc); electronSocket.emit(channel, { id: bw.id, wcId: wcId, args: [args] }); + event.returnValue = null; }); }); socket.on('registerSyncIpcMainChannel', (channel) => { @@ -33,6 +35,7 @@ module.exports = (socket) => { electron_1.ipcMain.once(channel, (event, args) => { event.preventDefault(); electronSocket.emit(channel, [args]); + event.returnValue = null; }); }); socket.on('removeAllListenersIpcMainChannel', (channel) => { diff --git a/ElectronNET.Host/api/ipc.ts b/ElectronNET.Host/api/ipc.ts index db0be14..b3505c6 100644 --- a/ElectronNET.Host/api/ipc.ts +++ b/ElectronNET.Host/api/ipc.ts @@ -8,6 +8,7 @@ export = (socket: Socket) => { ipcMain.on(channel, (event, args) => { event.preventDefault(); electronSocket.emit(channel, [args]); + event.returnValue = null; }); }); @@ -18,6 +19,7 @@ export = (socket: Socket) => { let wc = webContents.fromId(wcId) let bw = BrowserWindow.fromWebContents(wc); electronSocket.emit(channel, { id: bw.id, args: [args] }); + event.returnValue = null; }); }); @@ -37,6 +39,7 @@ export = (socket: Socket) => { ipcMain.once(channel, (event, args) => { event.preventDefault(); electronSocket.emit(channel, [args]); + event.returnValue = null; }); });