Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-11 19:22:34 +03:00
1 parent 35f081eaf4
commit 62eb0fa592
2 files changed
+6 -4

No files matched your search

+4 -1
View File
@@ -16,7 +16,10 @@ export interface IpcMessageHandler {
}
export function sendMessage(channel: IpcChannel, ...args: any[]) {
webContents.getFocusedWebContents().send(channel, ...args);
const webContent = webContents.getFocusedWebContents();
if (webContent) {
webContent.send(channel, ...args);
}
}
export async function invokeMessage(channel: IpcChannel, ...args: any[]) {