diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html b/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html index 9a816e1..2110cb1 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/editor.html @@ -194,8 +194,12 @@ const invoke = () => { try { - const updated = promptEditorRef.current.get(); - promptMessagesRef.current = updated; + if (promptEditorRef.current) { + const updated = promptEditorRef.current.get(); + promptMessagesRef.current = updated; + } else { + throw new Error("promptEditorRef.current is null"); + } } catch (e) { console.error("Invalid JSON structure", e); }