Skip to content

Commit 38248d6

Browse files
committed
fix(sonar): throw TypeError after type check (S7786)
1 parent e9f087c commit 38248d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/renderer/stores/useSettingsStore.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const useSettingsStore = create<SettingsStore>()(
2727
const current = state[name];
2828

2929
if (typeof current !== 'boolean') {
30-
throw new Error(`toggleSetting: '${String(name)}' is not a boolean setting`);
30+
throw new TypeError(`toggleSetting: '${String(name)}' is not a boolean setting`);
3131
}
3232

3333
return { [name]: !current };

0 commit comments

Comments
 (0)