mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Using a for-of loop on Map entries (forEach supported from node v22) (#18064)
This commit is contained in:
@@ -52,7 +52,7 @@ export function compareWorkflowsNodes<T extends { id: string }>(
|
||||
|
||||
const diff: WorkflowDiff<T> = new Map();
|
||||
|
||||
baseNodes.entries().forEach(([id, node]) => {
|
||||
for (const [id, node] of baseNodes.entries()) {
|
||||
if (!targetNodes.has(id)) {
|
||||
diff.set(id, { status: NodeDiffStatus.Deleted, node });
|
||||
} else if (!nodesEqual(baseNodes.get(id), targetNodes.get(id))) {
|
||||
@@ -60,13 +60,13 @@ export function compareWorkflowsNodes<T extends { id: string }>(
|
||||
} else {
|
||||
diff.set(id, { status: NodeDiffStatus.Eq, node });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
targetNodes.entries().forEach(([id, node]) => {
|
||||
for (const [id, node] of targetNodes.entries()) {
|
||||
if (!baseNodes.has(id)) {
|
||||
diff.set(id, { status: NodeDiffStatus.Added, node });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user