Skip to content

Build your personal knowledge base with Trilium Notes

fix(tree): note order sometimes incorrect (closes #1727)

Elian Doran482243b41973
diff --git a/docs/Release Notes/Release Notes/v0.93.0.md b/docs/Release Notes/Release Notes/v0.93.0.md
index 092f1390a7..68d22d5db8 100644
--- a/docs/Release Notes/Release Notes/v0.93.0.md
+++ b/docs/Release Notes/Release Notes/v0.93.0.md
@@ -14,6 +14,7 @@
* [Calendar stops displaying notes after adding a Day Note](https://github.com/TriliumNext/Notes/issues/1705)
* Full anonymization not redacting attachment titles.
* Unable to trigger "Move to" dialog via keyboard shortcut.
+* [Note ordering doesn't load correctly, only shows up right after moving a note](https://github.com/TriliumNext/Notes/issues/1727)
## ✨ Improvements
diff --git a/src/public/app/entities/fnote.ts b/src/public/app/entities/fnote.ts
index 068636efa4..3f09b4878d 100644
--- a/src/public/app/entities/fnote.ts
+++ b/src/public/app/entities/fnote.ts
@@ -151,7 +151,7 @@ class FNote {
for (const branchId of Object.values(this.childToBranch)) {
const notePosition = this.froca.getBranch(branchId)?.notePosition;
- if (notePosition) {
+ if (notePosition !== undefined) {
branchIdPos[branchId] = notePosition;
}
}