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

fix: folder view sort oder
pull/24347/head
Jonathan Jogenfors 2025-12-02 18:48:12 +07:00 committed by GitHub
parent b11aecd184
commit 62628dfcfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 2 deletions

@ -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()) {