From 09d11e473f374f4644158a49005953134e106e92 Mon Sep 17 00:00:00 2001 From: Jamey Huffnagle Date: Wed, 13 Mar 2024 10:29:42 -0400 Subject: [PATCH] try/catch the webcontents send to prevent an error on app close --- app-shell/src/notify.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app-shell/src/notify.ts b/app-shell/src/notify.ts index 97da822f63e3..c9134a5f9bf1 100644 --- a/app-shell/src/notify.ts +++ b/app-shell/src/notify.ts @@ -432,7 +432,9 @@ function sendToBrowserDeserialized({ topic, message, }: SendToBrowserParams): void { - browserWindow.webContents.send('notify', hostname, topic, message) + try { + browserWindow.webContents.send('notify', hostname, topic, message) + } catch {} } const VALID_RESPONSES: [NotifyRefetchData, NotifyUnsubscribeData] = [