-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 Mute volume being translated to max volume
Fixed a bug in the volume control logic where setting a volume to 0 would incorrectly reset it to 100. This happened because the original code used the logical OR operator (||), which treats 0 as a falsy value. The fix replaces || with the nullish coalescing operator (??), which only falls back to the default value when the input is null or undefined, not when it's 0.
- Loading branch information
Showing
2 changed files
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters