refactor: merge ipcMainUtils.handle / handleSync (#17062)
This commit is contained in:
parent
848d16525f
commit
5a99ea4c46
5 changed files with 13 additions and 17 deletions
|
@ -20,7 +20,7 @@ export function invoke<T> (command: string, ...args: any[]) {
|
|||
}
|
||||
|
||||
export function invokeSync<T> (command: string, ...args: any[]): T {
|
||||
const [ error, result ] = ipcRendererInternal.sendSync(command, ...args)
|
||||
const [ error, result ] = ipcRendererInternal.sendSync(command, null, ...args)
|
||||
|
||||
if (error) {
|
||||
throw errorUtils.deserialize(error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue