mirror of
https://github.com/shoedler/crossbow.git
synced 2026-07-22 07:40:26 +00:00
Fixes children appending bug *finally*
This commit is contained in:
parent
65033102fa
commit
e9a9332e1f
1 changed files with 8 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ export class Suggestion extends TreeItem<string> {
|
|||
this.getChildren()
|
||||
.sort((a, b) => a.value.line - b.value.line)
|
||||
.forEach((child) => {
|
||||
this.appendChild(child);
|
||||
this.childrenWrapper.appendChild(child);
|
||||
child.sortChildren();
|
||||
});
|
||||
}
|
||||
|
|
@ -65,9 +65,13 @@ export class Occurrence extends TreeItem<EditorPosition> {
|
|||
}
|
||||
|
||||
public sortChildren(): void {
|
||||
this.getChildren().sort(
|
||||
(a, b) => a.value.rank.codePointAt(0)! - b.value.rank.codePointAt(0)!
|
||||
);
|
||||
this.getChildren()
|
||||
.sort(
|
||||
(a, b) => a.value.rank.codePointAt(0)! - b.value.rank.codePointAt(0)!
|
||||
)
|
||||
.forEach((child) => {
|
||||
this.childrenWrapper.appendChild(child);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue