Skip to content

Commit

Permalink
try/catch the webcontents send to prevent an error on app close
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Mar 13, 2024
1 parent be1c04d commit 09d11e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app-shell/src/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [
Expand Down

0 comments on commit 09d11e4

Please sign in to comment.