Skip to content

Build your personal knowledge base with Trilium Notes

fix(ribbon): code note types not refreshing

Elian Doran1e1c8cc4ff09
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx
index 0c211739c5..d1719b1478 100644
--- a/apps/client/src/widgets/react/hooks.tsx
+++ b/apps/client/src/widgets/react/hooks.tsx
@@ -102,7 +102,7 @@ export function useTriliumOption(name: OptionNames, needsRefresh?: boolean): [st
const newValue = options.get(name);
setValue(newValue);
}
- }, [ name ]));
+ }, [ name, setValue ]));
useDebugValue(name);
diff --git a/apps/client/src/widgets/type_widgets/options/code_notes.tsx b/apps/client/src/widgets/type_widgets/options/code_notes.tsx
index a9f30bacc9..cf951e3b26 100644
--- a/apps/client/src/widgets/type_widgets/options/code_notes.tsx
+++ b/apps/client/src/widgets/type_widgets/options/code_notes.tsx
@@ -145,7 +145,7 @@ function CodeMimeTypes() {
result[initial].push(mimeType);
}
return result;
- }, []);
+ }, [ codeNotesMimeTypes ]);
return (
<OptionsSection title={t("code_mime_types.title")}>