diff --git a/src/preload/index.ts b/src/preload/index.ts index b552b0f..85e4910 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -16,7 +16,7 @@ contextBridge.exposeInMainWorld('fs', fs) contextBridge.exposeInMainWorld('removeLoading', removeLoading) contextBridge.exposeInMainWorld('ipcRenderer', { ...ipcRenderer, - on: (name: string, callback: () => {}) => { - ipcRenderer.on(name, callback) + on(...args: Parameters) { + return ipcRenderer.on(...args) } })