Ver código fonte

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

tags/1.7.1
HyaCinth 3 meses atrás
pai
commit
45cebf09b0
Nenhuma conta vinculada ao e-mail do autor do commit

+ 1
- 1
web/app/components/base/prompt-editor/constants.tsx Ver arquivo

@@ -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)

Carregando…
Cancelar
Salvar