Skip to content

Commit

Permalink
lastVolume can never be set to 0
Browse files Browse the repository at this point in the history
After the changes to how lastVolume is set, dragging the VolumeBar to 0
and then clicking on the leftmost part of the volumebar would result in
lastVolume being set to 0. This prevents that from happening.
  • Loading branch information
kevinlitchfield committed Jan 27, 2017
1 parent 0095835 commit ad8dd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ class Player extends Component {
* current volume as a percent when getting
*/
lastVolume(percentAsDecimal) {
if (percentAsDecimal !== undefined) {
if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {
this.lastVolume_ = percentAsDecimal;
return this;
}
Expand Down

0 comments on commit ad8dd5d

Please sign in to comment.