From a59143f4289a0f1930c18c62d4c2c218ba9f9b04 Mon Sep 17 00:00:00 2001 From: dylkaw <37286651+dylkaw@users.noreply.github.com> Date: Thu, 7 Nov 2024 02:26:00 +0800 Subject: [PATCH] Provide fallback string in case of empty value --- frontend/components/collab/code-editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/collab/code-editor.tsx b/frontend/components/collab/code-editor.tsx index b137124054..5f412971e8 100644 --- a/frontend/components/collab/code-editor.tsx +++ b/frontend/components/collab/code-editor.tsx @@ -147,7 +147,7 @@ export default function CodeEditor({ setEditor(editor); }} onChange={(value) => { - setCode(value); + setCode(value || ""); }} theme={theme === "dark" ? "vs-dark" : "light"} />