Skip to content

Commit

Permalink
Fix: incorrect optional integer argument logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnWong authored and copy committed Apr 8, 2018
1 parent 804e567 commit d1ac093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/browser/speaker.js
Expand Up @@ -236,7 +236,7 @@ SpeakerMixer.prototype.disconnect_source = function(source_id, channel)
*/
SpeakerMixer.prototype.set_volume = function(value, channel)
{
if(!channel)
if(channel === undefined)
{
channel = MIXER_CHANNEL_BOTH;
}
Expand Down Expand Up @@ -353,7 +353,7 @@ SpeakerMixerSource.prototype.disconnect = function(channel)
*/
SpeakerMixerSource.prototype.set_volume = function(value, channel)
{
if(!channel)
if(channel === undefined)
{
channel = MIXER_CHANNEL_BOTH;
}
Expand Down

0 comments on commit d1ac093

Please sign in to comment.