Prefer event.returnValue to event.result for sync messages.
This commit is contained in:
parent
50b5272354
commit
b225a59a15
3 changed files with 6 additions and 4 deletions
|
@ -16,9 +16,11 @@ class Ipc extends EventEmitter
|
|||
ipc.send('ATOM_INTERNAL_MESSAGE', args...)
|
||||
|
||||
sendSync: (args...) ->
|
||||
ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', 'sync-message', args...).result
|
||||
msg = ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', 'sync-message', args...)
|
||||
msg.returnValue ? msg.result
|
||||
|
||||
sendChannelSync: (args...) ->
|
||||
ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', args...).result
|
||||
msg = ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', args...)
|
||||
msg.returnValue ? msg.result
|
||||
|
||||
module.exports = new Ipc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue