fix(app): support additional arguments on messages

This commit is contained in:
Alexey Kasyanchuk
2018-02-08 03:44:25 +03:00
parent 9741c92019
commit 0e46df3dbc

View File

@ -13,8 +13,8 @@ const { ipcRenderer, remote } = require('electron');
window.torrentSocket = {}
window.torrentSocket.callbacks = {}
window.torrentSocket.on = (name, func) => {
ipcRenderer.on(name, (event, data) => {
func(data)
ipcRenderer.on(name, (event, ...data) => {
func(...data)
});
}
window.torrentSocket.off = (name, func) => {