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') }