From e6f23998941a832ead3334cb7a7a1db9315cee06 Mon Sep 17 00:00:00 2001 From: Hogyun Jeon Date: Thu, 28 Nov 2024 19:20:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20space=20connection=20error=EA=B0=80=20ro?= =?UTF-8?q?ute=EA=B0=80=20=EB=B0=94=EB=80=8C=EC=96=B4=EB=8F=84=20=EC=9C=A0?= =?UTF-8?q?=EC=A7=80=EB=90=98=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/hooks/yjs/useYjsConnection.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/hooks/yjs/useYjsConnection.tsx b/packages/frontend/src/hooks/yjs/useYjsConnection.tsx index 3f13fbc9..3248a34f 100644 --- a/packages/frontend/src/hooks/yjs/useYjsConnection.tsx +++ b/packages/frontend/src/hooks/yjs/useYjsConnection.tsx @@ -8,7 +8,7 @@ import { generateUserColor } from "@/lib/utils"; export default function useYjsConnection(docName: string) { const [status, setStatus] = useState< "connecting" | "connected" | "disconnected" - >("connecting"); + >("disconnected"); const [error, setError] = useState(); const [yDoc, setYDoc] = useState(); const [yProvider, setYProvider] = useState(); @@ -52,6 +52,8 @@ export default function useYjsConnection(docName: string) { } setYDoc(undefined); setYProvider(undefined); + setError(undefined); + setStatus("disconnected"); }; }, [docName]);