Ensure the LoadPreferences message is dispatched with None when no preferences exist (#3198)

* preference load message on default load

* review fixup
This commit is contained in:
Timon
2025-09-23 20:19:16 +00:00
committed by GitHub
parent 21f34ab19a
commit d15f63f4fd
6 changed files with 18 additions and 15 deletions
+1 -3
View File
@@ -147,9 +147,7 @@ export function createPersistenceManager(editor: Editor, portfolio: PortfolioSta
async function loadPreferences() {
const preferences = await get<Record<string, unknown>>("preferences", graphiteStore);
if (!preferences) return;
editor.handle.loadPreferences(JSON.stringify(preferences));
editor.handle.loadPreferences(preferences ? JSON.stringify(preferences) : undefined);
}
// FRONTEND MESSAGE SUBSCRIPTIONS