fix(breadcrumb): navigation on first level not working

This commit is contained in:
Elian Doran 2025-12-08 16:41:06 +02:00
parent c4285772b3
commit adc356eff3
No known key found for this signature in database

View File

@ -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.