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.
This commit is contained in:
parent
951283ca8a
commit
d274a28dbf
1 changed files with 4 additions and 1 deletions
|
|
@ -134,7 +134,10 @@ export const useSettingsStore = create<SettingsStore>()(
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue