From fbc5d4aff78bf15e4e183e00b18abae78171efc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Gediz=20Ayd=C4=B1ndo=C4=9Fmu=C5=9F?= Date: Wed, 15 Feb 2023 04:37:03 +0300 Subject: [PATCH] Update main.js Fix duplicate handler problem on macos --- main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.js b/main.js index f59505a..3fb5120 100644 --- a/main.js +++ b/main.js @@ -11,6 +11,8 @@ const createWindow = () => { preload: path.join(__dirname, 'preload.js'), } }) + // There can be only one handler so remove the previous one first + ipcMain.removeHandler('ping') ipcMain.handle('ping', () => 'pong') win.loadFile('index.html') }