Skip to content

Build your personal knowledge base with Trilium Notes

chore(react): fix a type error

Elian Dorand76d50f30e91
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx
index 26c41eee0f..b948f287ed 100644
--- a/apps/client/src/widgets/react/hooks.tsx
+++ b/apps/client/src/widgets/react/hooks.tsx
@@ -316,7 +316,7 @@ export function useNoteProperty<T extends keyof FNote>(note: FNote | null | unde
return note[property];
}
-export function useNoteLabel(note: FNote | undefined | null, labelName: string): [string | undefined, (newValue: string) => void] {
+export function useNoteLabel(note: FNote | undefined | null, labelName: string): [string | null | undefined, (newValue: string) => void] {
const [ labelValue, setNoteValue ] = useState<string | null | undefined>(note?.getLabelValue(labelName));
useTriliumEventBeta("entitiesReloaded", ({ loadResults }) => {