mirror of
https://github.com/immich-app/immich.git
synced 2025-12-06 01:10:00 +03:00
committed by
GitHub
parent
b11aecd184
commit
62628dfcfa
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user