fix: avoid using node_data.version for judgement tool node version (#22462)

Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
Novice
2025-07-21 09:28:47 +08:00
committed by GitHub
parent f9f46bfcbe
commit 17a8f1a0f1
12 changed files with 44 additions and 13 deletions

View File

@@ -286,8 +286,8 @@ export const initialNodes = (originNodes: Node[], originEdges: Edge[]) => {
}
}
if (node.data.type === BlockEnum.Tool && !(node as Node<ToolNodeType>).data.version) {
(node as Node<ToolNodeType>).data.version = '2'
if (node.data.type === BlockEnum.Tool && !(node as Node<ToolNodeType>).data.version && !(node as Node<ToolNodeType>).data.tool_node_version) {
(node as Node<ToolNodeType>).data.tool_node_version = '2'
const toolConfigurations = (node as Node<ToolNodeType>).data.tool_configurations
if (toolConfigurations && Object.keys(toolConfigurations).length > 0) {