mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
fixes to stable sorting
This commit is contained in:
@@ -130,7 +130,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} */
|
||||
@@ -228,7 +228,7 @@ class FNote {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user