Skip to content

Commit e5fdcb3

Browse files
authored
fix(sonar): throw TypeError after type check (S7786) (#3368)
1 parent 86b785d commit e5fdcb3

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)