fix(web): folder view sort oder (#24337)

fix: folder view sort oder
This commit is contained in:
Jonathan Jogenfors
2025-12-02 18:48:12 +01:00
committed by GitHub
parent b11aecd184
commit 62628dfcfa

View File

@@ -62,8 +62,16 @@ export class TreeNode extends Map<string, TreeNode> {
const child = this.values().next().value!;
child.value = joinPaths(this.value, child.value);
child.parent = this.parent;
this.parent.delete(this.value);
this.parent.set(child.value, child);
const entries = Array.from(this.parent.entries());
this.parent.clear();
for (const [key, value] of entries) {
if (key === this.value) {
this.parent.set(child.value, child);
} else {
this.parent.set(key, value);
}
}
}
for (const child of this.values()) {