From d209914d1c826a39984f08286f1324b3e817b00f Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Thu, 28 Jan 2021 07:53:19 +0200 Subject: [PATCH] cleanup ipc Signed-off-by: Jari Kolehmainen --- src/common/ipc.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/common/ipc.ts b/src/common/ipc.ts index 0b4e2c97d2..8368cdde6b 100644 --- a/src/common/ipc.ts +++ b/src/common/ipc.ts @@ -26,13 +26,9 @@ export async function broadcastMessage(channel: string, ...args: any[]) { if (!views) return; - let subFrames: Promise; - - if (ipcRenderer) { - subFrames = requestMain(subFramesChannel); - } else { - subFrames = getSubFrames(); - } + const subFrames: Promise = ipcRenderer + ? requestMain(subFramesChannel) + : getSubFrames(); views.forEach(async webContent => { const type = webContent.getType();