Skip to content

Build your personal knowledge base with Trilium Notes

chore(react): fix note path when empty

Elian Doran25d5d5108572
diff --git a/apps/client/src/widgets/ribbon/NotePathsTab.tsx b/apps/client/src/widgets/ribbon/NotePathsTab.tsx
index bde553eafa..00249b0b43 100644
--- a/apps/client/src/widgets/ribbon/NotePathsTab.tsx
+++ b/apps/client/src/widgets/ribbon/NotePathsTab.tsx
@@ -29,27 +29,25 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte
return (
<div class="note-paths-widget">
- {sortedNotePaths?.length && (
- <>
- <div className="note-path-intro">
- {sortedNotePaths.length > 0 ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
- </div>
-
- <ul className="note-path-list">
- {sortedNotePaths.map(sortedNotePath => (
- <NotePath
- currentNotePath={notePath}
- notePathRecord={sortedNotePath}
- />
- ))}
- </ul>
-
- <Button
- triggerCommand="cloneNoteIdsTo"
- text={t("note_paths.clone_button")}
- />
- </>
- )}
+ <>
+ <div className="note-path-intro">
+ {sortedNotePaths?.length ? t("note_paths.intro_placed") : t("note_paths.intro_not_placed")}
+ </div>
+
+ <ul className="note-path-list">
+ {sortedNotePaths?.length ? sortedNotePaths.map(sortedNotePath => (
+ <NotePath
+ currentNotePath={notePath}
+ notePathRecord={sortedNotePath}
+ />
+ )) : undefined}
+ </ul>
+
+ <Button
+ triggerCommand="cloneNoteIdsTo"
+ text={t("note_paths.clone_button")}
+ />
+ </>
</div>
)
}