Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: text.split (#17842)

crazywoola7ee5cc80a2eb
diff --git a/web/app/components/base/prompt-editor/utils.ts b/web/app/components/base/prompt-editor/utils.ts
index 6d7d636e552..4b2570e6970 100644
--- a/web/app/components/base/prompt-editor/utils.ts
+++ b/web/app/components/base/prompt-editor/utils.ts
@@ -296,7 +296,7 @@ export function $splitNodeContainingQuery(match: MenuTextMatch): TextNode | null
}
export function textToEditorState(text: string) {
- const paragraph = text ? text.split('\n') : ['']
+ const paragraph = text && (typeof text === 'string') ? text.split('\n') : ['']
return JSON.stringify({
root: {