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): breadcrumb shown if there are no children
Elian Doran223ba4643ff7
diff --git a/apps/client/src/widgets/Breadcrumb.tsx b/apps/client/src/widgets/Breadcrumb.tsxindex a4874599db..a624e2e58a 100644--- a/apps/client/src/widgets/Breadcrumb.tsx+++ b/apps/client/src/widgets/Breadcrumb.tsx@@ -8,7 +8,7 @@ import { FormListItem } from "./react/FormList";import NoteContext from "../components/note_context";export default function Breadcrumb() {- const { noteContext } = useNoteContext();+ const { note, noteContext } = useNoteContext();const notePath = buildNotePaths(noteContext?.notePathArray);return (@@ -16,7 +16,8 @@ export default function Breadcrumb() {{notePath.map((item, index) => (<Fragment key={item}><BreadcrumbItem notePath={item} />- <BreadcrumbSeparator notePath={item} activeNotePath={notePath[index+1]} noteContext={noteContext} />+ {(index < notePath.length - 1 || note?.hasChildren()) &&+ <BreadcrumbSeparator notePath={item} activeNotePath={notePath[index+1]} noteContext={noteContext} />}</Fragment>))}</div>