mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-04-25 14:12:43 +08:00
fix: resolve window.ipcRenderer.invoke
no returns a Promise
This commit is contained in:
parent
c7e5fd70cd
commit
2af2a376b0
@ -16,7 +16,7 @@ contextBridge.exposeInMainWorld('ipcRenderer', {
|
|||||||
},
|
},
|
||||||
invoke(...args: Parameters<typeof ipcRenderer.invoke>) {
|
invoke(...args: Parameters<typeof ipcRenderer.invoke>) {
|
||||||
const [channel, ...omit] = args
|
const [channel, ...omit] = args
|
||||||
ipcRenderer.invoke(channel, ...omit)
|
return ipcRenderer.invoke(channel, ...omit)
|
||||||
},
|
},
|
||||||
|
|
||||||
// You can expose other APTs you need here.
|
// You can expose other APTs you need here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user