trympet / homebridge-volvo

Volvo plugin for Homebridge
https://npm.im/homebridge-volvo
Apache License 2.0
26 stars 6 forks source link

Fix logic/syntax bugs with switch statements matching multiple values #24

Closed drakkhen closed 3 years ago

drakkhen commented 3 years ago

After a bit of tinkering, I figured out the cause of Issues #18, #22, and #23. The OR (||) conditional for multiple case values was not working as intended -- they only matched the first value in each case instead of any of the values separated by ||.

Converting those to use the fall-through feature of the switch statement resolved the problems.

trympet commented 3 years ago

Good observation. Thanks for the PR!