Update main.js

Fix duplicate handler problem on macos
main
Nazım Gediz Aydındoğmuş 2 years ago
parent 10fdd57e14
commit fbc5d4aff7

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

Loading…
Cancel
Save