diff --git a/src/common/ipc.ts b/src/common/ipc.ts index 3baf185141..f13ea30b9f 100644 --- a/src/common/ipc.ts +++ b/src/common/ipc.ts @@ -35,7 +35,7 @@ export async function broadcastMessage(channel: string, ...args: any[]) { } else { subFrames = await getSubFrames(); } - const views = (webContents || remote.webContents)?.getAllWebContents(); + const views = (webContents || remote?.webContents)?.getAllWebContents(); if (!views) return;