electron-better-ipc
electron-better-ipc copied to clipboard
BetterIpcRenderer on method only gets called once
As the title says the on method of electron-better-ipcs ipcRenderer only gets called once and the original on get called every time a message is sent.
// Renderer
ipcRenderer.on("channel", console.log)
// Main
ipcMain.sendToRenderers("channel", "test")
ipcMain.sendToRenderers("channel", "test")
This example only logs once with the better ipc one and twice with the vanilla version
Can you confirm you're on version 2.0.1? Because a similar issue was fixed in 2.0.1: https://github.com/sindresorhus/electron-better-ipc/commit/fdda864e00358bb3141440c0c30f86aa73ef3723
Yes I am running on version 2.0.1 If I downgrade to 2.0.0 it doesn't even get called once
// @t13m In case you have any idea what might cause this.
Have no idea yet, but I'll try to dig in a little bit, will update later when i find something
@MasterGordon Hi, I tried in electron fiddle with v13.1.7, and no luck to reproduce this problem, the message correctly shows twice.
@t13m I will try to create a repo for reproduction.