use async await for ipc.exec()

This commit is contained in:
SrGooglo 2024-03-25 08:13:42 +01:00
parent b660c4e458
commit 37daf2fc16

View File

@ -31,8 +31,8 @@ if (process.contextIsolated) {
contextBridge.exposeInMainWorld( contextBridge.exposeInMainWorld(
"ipc", "ipc",
{ {
exec: (channel, ...args) => { exec: async (channel, ...args) => {
return ipcRenderer.invoke(channel, ...args) return await ipcRenderer.invoke(channel, ...args)
}, },
send: (channel, args) => { send: (channel, args) => {
ipcRenderer.send(channel, args) ipcRenderer.send(channel, args)