mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
randomize existing fixed branchIds so it's clear they should not be relied upon
This commit is contained in:
@@ -12,6 +12,9 @@ const log = require("../../services/log");
|
|||||||
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||||
* parents.
|
* parents.
|
||||||
*
|
*
|
||||||
|
* Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||||
|
* Always check noteId instead.
|
||||||
|
*
|
||||||
* @extends AbstractEntity
|
* @extends AbstractEntity
|
||||||
*/
|
*/
|
||||||
class Branch extends AbstractEntity {
|
class Branch extends AbstractEntity {
|
||||||
@@ -210,7 +213,7 @@ class Branch extends AbstractEntity {
|
|||||||
let maxNotePos = 0;
|
let maxNotePos = 0;
|
||||||
|
|
||||||
for (const childBranch of this.parentNote.getChildBranches()) {
|
for (const childBranch of this.parentNote.getChildBranches()) {
|
||||||
if (maxNotePos < childBranch.notePosition && childBranch.branchId !== '_hidden') {
|
if (maxNotePos < childBranch.notePosition && childBranch.noteId !== '_hidden') {
|
||||||
maxNotePos = childBranch.notePosition;
|
maxNotePos = childBranch.notePosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user