From d274a28dbf0e49e7d81ba577ef6fcca9da666789 Mon Sep 17 00:00:00 2001 From: Jinhyeok Lee Date: Tue, 4 Nov 2025 00:33:11 +0900 Subject: [PATCH] fix: add missing defaults option to plugin-store load() call (#288) The plugin-store 2.4.1 requires the 'defaults' property in StoreOptions. Previously, only 'autoSave: false' was provided, causing a TypeScript error. Now passing DEFAULT_SETTINGS as the defaults value. --- src/stores/settingsStore.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.ts index d57b82f..02e1fb1 100644 --- a/src/stores/settingsStore.ts +++ b/src/stores/settingsStore.ts @@ -134,7 +134,10 @@ export const useSettingsStore = create()( refreshSettings: async () => { try { const { load } = await import("@tauri-apps/plugin-store"); - const store = await load("settings_store.json", { autoSave: false }); + const store = await load("settings_store.json", { + defaults: DEFAULT_SETTINGS, + autoSave: false + }); const settings = (await store.get("settings")) as Settings; // Load additional settings that come from invoke calls