From f4ac6ef7fb61b2ed8c655f69545d0e774c17f9e9 Mon Sep 17 00:00:00 2001 From: Alexander Bentkamp Date: Tue, 24 Jan 2023 17:17:12 +0100 Subject: [PATCH] remove infoprovider.dispose() The issue is that this removes the server notification subscriptions and then we get an error because react executes the cleanup of child components only after cleanup of parent components --- client/src/components/Level.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Level.tsx b/client/src/components/Level.tsx index 5031dc9..e093b25 100644 --- a/client/src/components/Level.tsx +++ b/client/src/components/Level.tsx @@ -280,7 +280,7 @@ function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCo setInfoProvider(infoProvider) setInfoviewApi(infoviewApi) - return () => { editor.setModel(null); infoProvider.dispose(); editor.dispose() } + return () => { editor.setModel(null); editor.dispose() } }, []) const {leanClient, leanClientStarted} = useLeanClient()