Safely handle sound settings

This commit is contained in:
J Francisco Rader committed 2021-03-02 09:27:49 -05:00
1 parent ba69ff4b8d
commit c37f6a66b4
1 file changed
+3 -2
+3 -2
View File
@@ -20,8 +20,9 @@ export const getSoundSettings = (
try { try {
return app return app
? { ? {
sound: getPath[type](settings[`${app}_${type}`]), sound: getPath[type](settings[`${app}_${type}`] || settings[type]),
volume: settings[`${app}_${type}Vol`] / 100, volume:
(settings[`${app}_${type}Vol`] || settings[`${type}Vol`]) / 100,
} }
: { : {
sound: getPath[type](settings[type]), sound: getPath[type](settings[type]),