Browse Source

Update input-var-list.tsx (#9987)

左凌 4 months ago
parent
commit
7a00798027

+ 1 - 1
web/app/components/workflow/nodes/tool/components/input-var-list.tsx

@@ -162,7 +162,7 @@ const InputVarList: FC<Props> = ({
                   readonly={readOnly}
                   readonly={readOnly}
                   isShowNodeName
                   isShowNodeName
                   nodeId={nodeId}
                   nodeId={nodeId}
-                  value={varInput?.type === VarKindType.constant ? (varInput?.value || '') : (varInput?.value || [])}
+                  value={varInput?.type === VarKindType.constant ? (varInput?.value ?? '') : (varInput?.value ?? [])}
                   onChange={handleNotMixedTypeChange(variable)}
                   onChange={handleNotMixedTypeChange(variable)}
                   onOpen={handleOpen(index)}
                   onOpen={handleOpen(index)}
                   defaultVarKindType={varInput?.type || (isNumber ? VarKindType.constant : VarKindType.variable)}
                   defaultVarKindType={varInput?.type || (isNumber ? VarKindType.constant : VarKindType.variable)}