chore(client): address requested changes

This commit is contained in:
Elian Doran 2025-12-15 17:14:00 +02:00
parent f21ba207fe
commit 1feeb350ce
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -241,7 +241,7 @@ function buildNotePaths(noteContext: NoteContext) {
} }
// When hoisted, display only the path starting with the hoisted note. // 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); output = output.slice(hoistedNotePos);
} }

View File

@ -267,7 +267,7 @@ export function useTriliumOptions<T extends OptionNames>(...names: T[]) {
* @returns a name with the given prefix and a random alpanumeric string appended to it. * @returns a name with the given prefix and a random alpanumeric string appended to it.
*/ */
export function useUniqueName(prefix?: string) { export function useUniqueName(prefix?: string) {
return useMemo(() => (prefix ? `${prefix }-` : "") + utils.randomString(10), [ prefix ]); return useMemo(() => (prefix ? `${prefix}-` : "") + utils.randomString(10), [ prefix ]);
} }
export function useNoteContext() { export function useNoteContext() {