Selaa lähdekoodia

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

tags/1.7.1
HyaCinth 3 kuukautta sitten
vanhempi
commit
45cebf09b0
No account linked to committer's email address
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1
    1
      web/app/components/base/prompt-editor/constants.tsx

+ 1
- 1
web/app/components/base/prompt-editor/constants.tsx Näytä tiedosto

@@ -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…
Peruuta
Tallenna