mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
fix(breadcrumb): navigation on first level not working
This commit is contained in:
parent
c4285772b3
commit
adc356eff3
@ -47,7 +47,7 @@ function BreadcrumbSeparator({ notePath, noteContext }: { notePath: string, note
|
||||
|
||||
function 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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user