mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
randomize existing fixed branchIds so it's clear they should not be relied upon
This commit is contained in:
parent
1a1fb126c1
commit
5ae0a5cf1e
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user