From 969c8cee21d6ce9563a9bc75600c68475b0e95ba Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 20 Apr 2017 01:32:18 +0900 Subject: [PATCH] IPC workaround is no longer needed with Electron 1.6.5 --- renderer/ipc.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/renderer/ipc.ts b/renderer/ipc.ts index 82bd699..a36fbc8 100644 --- a/renderer/ipc.ts +++ b/renderer/ipc.ts @@ -4,13 +4,8 @@ const electron = r('electron'); const ipc = electron.ipcRenderer; export function on(channel: IpcChannelFromMain, callback: (...args: any[]) => void) { - ipc.on(channel, (...args: any[]) => { + ipc.on(channel, (_, ...args: any[]) => { log.info('IPC: Received from:', channel, args); - // XXX: Weird... - // First element is Event in Windows as documented. But not in macOS. - if (args[0] instanceof Event) { - args = args.splice(1); - } callback(...args); }); }