浏览代码

fix: prompt editor insert quickly (#4004)

zxhlyh 11 月之前
父节点
当前提交
8b3edac091
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
     },