Browse Source

fix: prompt editor insert quickly (#4004)

zxhlyh 11 months ago
parent
commit
8b3edac091
1 changed files with 1 additions and 1 deletions
  1. 1 1
      web/app/components/base/prompt-editor/index.tsx

+ 1 - 1
web/app/components/base/prompt-editor/index.tsx

@@ -115,7 +115,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
       WorkflowVariableBlockNode,
       VariableValueBlockNode,
     ],
-    editorState: value ? textToEditorState(value as string) : null,
+    editorState: textToEditorState(value || ''),
     onError: (error: Error) => {
       throw error
     },