We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b11aecd commit 62628dfCopy full SHA for 62628df
web/src/lib/utils/tree-utils.ts
@@ -62,8 +62,16 @@ export class TreeNode extends Map<string, TreeNode> {
62
const child = this.values().next().value!;
63
child.value = joinPaths(this.value, child.value);
64
child.parent = this.parent;
65
- this.parent.delete(this.value);
66
- this.parent.set(child.value, child);
+
+ const entries = Array.from(this.parent.entries());
67
+ this.parent.clear();
68
+ for (const [key, value] of entries) {
69
+ if (key === this.value) {
70
+ this.parent.set(child.value, child);
71
+ } else {
72
+ this.parent.set(key, value);
73
+ }
74
75
}
76
77
for (const child of this.values()) {
0 commit comments