From 315debee4af9bc9993a94a812af60ba8300e899d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Dec 2023 12:45:26 +0100 Subject: [PATCH] catch error --- libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx index 422405dc9a..7590fcee6b 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx @@ -82,8 +82,11 @@ function HomeTabFile({ plugin }: HomeTabFileProps) { deleteSavedWorkspace(deletedName) }) return () => { - plugin.off('filePanel', 'setWorkspace') - plugin.off('filePanel', 'workspaceDeleted') + try { + plugin.off('filePanel', 'setWorkspace') + plugin.off('filePanel', 'workspaceDeleted') + } catch (e) { + } } }, [plugin])