mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 17:23:57 +00:00
fix: handling exception and ESLint issues
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user