Skip to content

Build your personal knowledge base with Trilium Notes

fix(tree): fix failure to auto-activate hoisted note

SiriusXT9f800df5ad56
diff --git a/apps/client/src/services/tree.ts b/apps/client/src/services/tree.ts
index ec5bc0191f..cfa210600b 100644
--- a/apps/client/src/services/tree.ts
+++ b/apps/client/src/services/tree.ts
@@ -89,7 +89,7 @@ async function resolveNotePathToSegments(notePath: string, hoistedNoteId = "root
effectivePathSegments.reverse();
- if (effectivePathSegments.includes(hoistedNoteId)) {
+ if (effectivePathSegments.includes(hoistedNoteId) && effectivePathSegments.includes('root')) {
return effectivePathSegments;
} else {
const noteId = getNoteIdFromUrl(notePath);