Skip to content

Commit

Permalink
fix: Mute event failed because of wrong check
Browse files Browse the repository at this point in the history
Fixed: #79
  • Loading branch information
svrooij committed Dec 7, 2020
1 parent 8e2400c commit af4787a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sonos-device.ts
Expand Up @@ -606,7 +606,7 @@ export default class SonosDevice extends SonosDeviceBase {
this.Events.emit(SonosEvents.Volume, this.volume ?? 0);
}

if (data.Mute && data.Mute.Master && this.muted !== data.Mute.Master) {
if (data.Mute && typeof data.Mute.Master === 'boolean' && this.muted !== data.Mute.Master) {
this.muted = data.Mute.Master;
this.Events.emit(SonosEvents.Mute, this.muted);
}
Expand Down

0 comments on commit af4787a

Please sign in to comment.