fix: loop node snapshot & infinite reload (#3349)
This commit is contained in:
@@ -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
|
||||
}));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user