From e1939cc64a8656bc94f873add52ca2b6d1689dc9 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:16:54 -0500 Subject: [PATCH] guh --- src/plugins/devCompanion.dev/initWs.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/plugins/devCompanion.dev/initWs.tsx b/src/plugins/devCompanion.dev/initWs.tsx index 1cb67fa75..7bb3738a8 100644 --- a/src/plugins/devCompanion.dev/initWs.tsx +++ b/src/plugins/devCompanion.dev/initWs.tsx @@ -56,14 +56,21 @@ export function initWs(isManual = false) { } - (settings.store.notifyOnAutoConnect || isManual) && Toasts.show({ - message: "Connected to WebSocket", - id: Toasts.genId(), - type: Toasts.Type.SUCCESS, - options: { - position: Toasts.Position.TOP + try { + if (settings.store.notifyOnAutoConnect || isManual) { + Toasts.show({ + message: "Connected to WebSocket", + id: Toasts.genId(), + type: Toasts.Type.SUCCESS, + options: { + position: Toasts.Position.TOP + } + }); } - }); + } + catch (e) { + console.error(e); + } }); ws.addEventListener("error", e => {