瀏覽代碼

fix: Optimize input variable retrieval logic (#22888) (#22914)

tags/1.7.1
HyaCinth 3 月之前
父節點
當前提交
45cebf09b0
No account linked to committer's email address
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      web/app/components/base/prompt-editor/constants.tsx

+ 1
- 1
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)

Loading…
取消
儲存