Skip to content

Build your personal knowledge base with Trilium Notes

chore(react/ribbon): fix a few type errors

Elian Doranb24d78693364
diff --git a/apps/client/src/widgets/ribbon/NotePathsTab.tsx b/apps/client/src/widgets/ribbon/NotePathsTab.tsx
index c5017af09a..469f324300 100644
--- a/apps/client/src/widgets/ribbon/NotePathsTab.tsx
+++ b/apps/client/src/widgets/ribbon/NotePathsTab.tsx
@@ -54,7 +54,7 @@ export default function NotePathsTab({ note, hoistedNoteId, notePath }: TabConte
)
}
-function NotePath({ currentNotePath, notePathRecord }: { currentNotePath: string, notePathRecord?: NotePathRecord }) {
+function NotePath({ currentNotePath, notePathRecord }: { currentNotePath?: string | null, notePathRecord?: NotePathRecord }) {
const notePath = notePathRecord?.notePath ?? [];
const notePathString = useMemo(() => notePath.join("/"), [ notePath ]);
diff --git a/apps/client/src/widgets/ribbon/ribbon-interface.ts b/apps/client/src/widgets/ribbon/ribbon-interface.ts
index 1165447e23..6fa15edc5a 100644
--- a/apps/client/src/widgets/ribbon/ribbon-interface.ts
+++ b/apps/client/src/widgets/ribbon/ribbon-interface.ts
@@ -3,7 +3,7 @@ import FNote from "../../entities/fnote";
export interface TabContext {
note: FNote | null | undefined;
hidden: boolean;
- ntxId?: string | null | undefined;
+ ntxId?: string | null;
hoistedNoteId?: string;
- notePath?: string;
+ notePath?: string | null;
}