This commit is contained in:
zadam
2023-11-03 12:23:14 +01:00
parent a45b801a84
commit 6dd466ddaf
9 changed files with 124 additions and 141 deletions

View File

@@ -158,7 +158,7 @@ class FNote {
branchIdPos[branchId] = this.froca.getBranch(branchId).notePosition;
}
this.children.sort((a, b) => branchIdPos[this.childToBranch[a]] < branchIdPos[this.childToBranch[b]] ? -1 : 1);
this.children.sort((a, b) => branchIdPos[this.childToBranch[a]] - branchIdPos[this.childToBranch[b]]);
}
/** @returns {boolean} */
@@ -256,7 +256,7 @@ class FNote {
return 1;
}
return -1;
return aNoteId < bNoteId ? -1 : 1;
});
}