fix: loop node snapshot & infinite reload (#3349)

This commit is contained in:
heheer
2024-12-09 18:18:33 +08:00
committed by GitHub
parent 1a294c1fd3
commit c64d629a6a
5 changed files with 84 additions and 81 deletions

View File

@@ -619,7 +619,6 @@ export const compareSnapshot = (
return nodes
.filter((node) => {
if (!node) return;
if (FlowNodeTypeEnum.systemConfig === node.type) return;
return true;
})
@@ -634,7 +633,8 @@ export const compareSnapshot = (
key: input.key,
selectedTypeIndex: input.selectedTypeIndex ?? 0,
renderTypeLis: input.renderTypeList,
valueType: input.valueType,
// set to arrayAny for loopInputArray to skip valueType comparison
valueType: input.key === NodeInputKeyEnum.loopInputArray ? 'arrayAny' : input.valueType,
value: input.value ?? undefined
})),
outputs: node.data.outputs.map((item: FlowNodeOutputItemType) => ({
@@ -661,13 +661,3 @@ export const compareSnapshot = (
return isEqual(node1, node2);
};
// remove node size
export const simplifyWorkflowNodes = (nodes: Node[]) => {
return nodes.map((node) => ({
id: node.id,
type: node.type,
position: node.position,
data: node.data
}));
};