Skip to content

Build your personal knowledge base with Trilium Notes

feat(breadcrumbs): display separator even if no child notes

Elian Doran8434549a9b0b
diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsx
index bc1494d3db..043a682063 100644
--- a/apps/client/src/widgets/layout/Breadcrumb.tsx
+++ b/apps/client/src/widgets/layout/Breadcrumb.tsx
@@ -65,8 +65,7 @@ export default function Breadcrumb() {
? <BreadcrumbRoot noteContext={noteContext} />
: <BreadcrumbItem index={index} notePath={item} notePathLength={notePaths.length} noteContext={noteContext} parentComponent={parentComponent} />
}
- {(index < notePaths.length - 1 || note?.hasChildren()) &&
- <BreadcrumbSeparator notePath={item} activeNotePath={notePaths[index + 1]} {...separatorProps} />}
+ <BreadcrumbSeparator notePath={item} activeNotePath={notePaths[index + 1]} {...separatorProps} />
</Fragment>
))
)}
@@ -226,7 +225,7 @@ function BreadcrumbSeparatorDropdownContent({ notePath, noteContext, activeNoteP
</li>;
})}
- <FormDropdownDivider />
+ {childNotes.length > 0 && <FormDropdownDivider />}
<FormListItem
icon="bx bx-plus"
onClick={() => note_create.createNote(notePath, { activate: true })}