Closed neilenns closed 4 months ago
I think if eslint had @typescript-eslint/stylistic-type-checked
rules enabled it would have caught this before it was a problem. The https://typescript-eslint.io/rules/prefer-nullish-coalescing/ rule specifically prefers ??
over ||
for this very reason.
I might try enabling that and see what else it finds...
I'm lucky, on Windows my
audioApi
value is0
. This exposed a host of problems in the code that tested the value ofaudioApi
using logical or. This resulted in a default value of-1
being used when calling afv-native, and basically broke all audio.Changes:
defaultConfiguration
object that defines the default value for all configuration propertiescurrentConfiguration
object always has a value for all the properties, even if it's first run of the app or one of the properties was manually deleted from the saved config.||
as a method of catching undefined/invalid configuration values since that can't happen anymoreVerified on Windows the following works:
audioApi
property from a config file