fix: node use vision model may caused page crash (#15921)

This commit is contained in:
Joel 2025-03-16 08:54:18 +08:00 committed by GitHub
parent 0587eb4956
commit f8f21ef7c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
)
}
if (isVisionModel && data.vision.enabled && data.vision.configs?.variable_selector) {
if (isVisionModel && data.vision?.enabled && data.vision?.configs?.variable_selector) {
const currentVariable = findVariableWhenOnLLMVision(data.vision.configs.variable_selector, availableVars)
forms.push(

View File

@ -89,7 +89,7 @@ const Panel: FC<NodePanelProps<ParameterExtractorNodeType>> = ({
},
)
if (isVisionModel && data.vision.enabled && data.vision.configs?.variable_selector) {
if (isVisionModel && data.vision?.enabled && data.vision?.configs?.variable_selector) {
const currentVariable = findVariableWhenOnLLMVision(data.vision.configs.variable_selector, availableVisionVars)
forms.push(

View File

@ -77,7 +77,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
},
)
if (isVisionModel && data.vision.enabled && data.vision.configs?.variable_selector) {
if (isVisionModel && data.vision?.enabled && data.vision?.configs?.variable_selector) {
const currentVariable = findVariableWhenOnLLMVision(data.vision.configs.variable_selector, availableVisionVars)
forms.push(