fix: handling exception and ESLint issues

This commit is contained in:
Moyasee
2025-11-09 04:19:52 +02:00
parent 482d9b2f96
commit 3daf28c882
2 changed files with 7 additions and 3 deletions

View File

@@ -46,6 +46,10 @@ const importThemeSoundFromStore = async (
logger.log(`Successfully imported sound for theme ${themeName}`);
return;
} catch (error) {
logger.error(
`Failed to import ${format} sound for theme ${themeName}`,
error
);
continue;
}
}

View File

@@ -361,16 +361,16 @@ export function SettingsGeneral() {
}
const volumePercent = Math.min(
100,
Math.max(0, parseInt(value, 10))
Math.max(0, Number.parseInt(value, 10))
);
if (!isNaN(volumePercent)) {
if (!Number.isNaN(volumePercent)) {
handleVolumeChange(volumePercent);
}
}}
onBlur={(e) => {
if (
e.target.value === "" ||
isNaN(parseInt(e.target.value, 10))
Number.isNaN(Number.parseInt(e.target.value, 10))
) {
handleVolumeChange(0);
}