Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(breadcrumb): navigation on first level not working
Elian Doranadc356eff338
diff --git a/apps/client/src/widgets/Breadcrumb.tsx b/apps/client/src/widgets/Breadcrumb.tsxindex 3adf46b0aa..945f55e643 100644--- a/apps/client/src/widgets/Breadcrumb.tsx+++ b/apps/client/src/widgets/Breadcrumb.tsx@@ -47,7 +47,7 @@ function BreadcrumbSeparator({ notePath, noteContext }: { notePath: string, notefunction BreadcrumbSeparatorDropdownContent({ notePath, noteContext }: { notePath: string, noteContext: NoteContext | undefined }) {const notePathComponents = notePath.split("/");- const parentNoteId = notePathComponents.pop();+ const parentNoteId = notePathComponents.length > 1 ? notePathComponents.pop() : "root";const childNotes = useChildNotes(parentNoteId);const notePathPrefix = notePathComponents.join("/"); // last item was removed already.