fix: input vars not auto rename in list operator (#9550)

This commit is contained in:
Joel
2024-10-21 16:48:42 +08:00
committed by GitHub
parent f83ed19dfe
commit 65e22bb76a
2 changed files with 12 additions and 1 deletions

View File

@@ -739,6 +739,11 @@ export const getNodeUsedVars = (node: Node): ValueSelector[] => {
res = [(data as IterationNodeType).iterator_selector]
break
}
case BlockEnum.ListFilter: {
res = [(data as ListFilterNodeType).variable]
break
}
}
return res || []
}
@@ -997,6 +1002,12 @@ export const updateNodeVars = (oldNode: Node, oldVarSelector: ValueSelector, new
break
}
case BlockEnum.ListFilter: {
const payload = data as ListFilterNodeType
if (payload.variable.join('.') === oldVarSelector.join('.'))
payload.variable = newVarSelector
break
}
}
})
return newNode