fix: ensure that internal messages are sent from the main process (#26429)

This commit is contained in:
Milan Burda 2020-11-12 04:20:01 +01:00 committed by GitHub
parent 83d30c5c2a
commit 5ee9cc202b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 9 deletions

View file

@ -302,7 +302,7 @@ function metaToError (meta: { type: 'error', value: any, members: ObjectMember[]
}
function handleMessage (channel: string, handler: Function) {
ipcRendererInternal.on(channel, (event, passedContextId, id, ...args) => {
ipcRendererInternal.onMessageFromMain(channel, (event, passedContextId, id, ...args) => {
if (passedContextId === contextId) {
handler(id, ...args);
} else {