Skip to content

Commit cc7ae6b

Browse files
committed
fix: Could not save settings on Firefox
1 parent e374795 commit cc7ae6b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/composables/useForm.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ export function useForm<T extends Record<string, any>>(
1919
if (!hasChanges.value) return;
2020

2121
try {
22-
// @ts-expect-error: Not sure why TS is mad
23-
await saveChanges(state);
22+
await saveChanges(toRaw(state) as T);
2423
Object.assign(resetState, state);
25-
} catch {}
24+
} catch (err) {
25+
console.error("Error saving changes:", err);
26+
}
2627
},
2728
};
2829
}

0 commit comments

Comments
 (0)