From 42d8211871d84e2650f7c762c66e2ee2e6c58968 Mon Sep 17 00:00:00 2001
From: V <vendicated@riseup.net>
Date: Tue, 13 Jun 2023 02:29:15 +0200
Subject: Fix disabling plugins whose stop() errors

---
 src/plugins/arRPC.web.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/plugins/arRPC.web.tsx')

diff --git a/src/plugins/arRPC.web.tsx b/src/plugins/arRPC.web.tsx
index 9a16c64..f0d4841 100644
--- a/src/plugins/arRPC.web.tsx
+++ b/src/plugins/arRPC.web.tsx
@@ -104,6 +104,6 @@ export default definePlugin({
 
     stop() {
         FluxDispatcher.dispatch({ type: "LOCAL_ACTIVITY_UPDATE", activity: null }); // clear status
-        ws.close(); // close WebSocket
+        ws?.close(); // close WebSocket
     }
 });
-- 
cgit 

