From 1feeb350ced95b446ff685f17a7ba2a2def32e14 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 15 Dec 2025 17:14:00 +0200 Subject: [PATCH] chore(client): address requested changes --- apps/client/src/widgets/layout/Breadcrumb.tsx | 2 +- apps/client/src/widgets/react/hooks.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/layout/Breadcrumb.tsx b/apps/client/src/widgets/layout/Breadcrumb.tsx index 511ed2de0..a814fb13a 100644 --- a/apps/client/src/widgets/layout/Breadcrumb.tsx +++ b/apps/client/src/widgets/layout/Breadcrumb.tsx @@ -241,7 +241,7 @@ function buildNotePaths(noteContext: NoteContext) { } // When hoisted, display only the path starting with the hoisted note. - if (noteContext.hoistedNoteId !== "root") { + if (noteContext.hoistedNoteId !== "root" && hoistedNotePos > -1) { output = output.slice(hoistedNotePos); } diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index 535a797f5..d01fb8156 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -267,7 +267,7 @@ export function useTriliumOptions(...names: T[]) { * @returns a name with the given prefix and a random alpanumeric string appended to it. */ export function useUniqueName(prefix?: string) { - return useMemo(() => (prefix ? `${prefix }-` : "") + utils.randomString(10), [ prefix ]); + return useMemo(() => (prefix ? `${prefix}-` : "") + utils.randomString(10), [ prefix ]); } export function useNoteContext() {