From 45cebf09b04223a71f93603386684bca0a305ee6 Mon Sep 17 00:00:00 2001 From: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Date: Thu, 24 Jul 2025 21:57:55 +0800 Subject: [PATCH] fix: Optimize input variable retrieval logic (#22888) (#22914) --- web/app/components/base/prompt-editor/constants.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/base/prompt-editor/constants.tsx b/web/app/components/base/prompt-editor/constants.tsx index 31fbc0abb..48e67a4ee 100644 --- a/web/app/components/base/prompt-editor/constants.tsx +++ b/web/app/components/base/prompt-editor/constants.tsx @@ -30,7 +30,7 @@ export const checkHasQueryBlock = (text: string) => { * {{#1711617514996.sys.query#}} => [sys, query] */ export const getInputVars = (text: string): ValueSelector[] => { - if (!text) + if (!text || typeof text !== 'string') return [] const allVars = text.match(/{{#([^#]*)#}}/g)