Skip to content

Commit

Permalink
add check for undefined station #299
Browse files Browse the repository at this point in the history
  • Loading branch information
withstu committed Oct 8, 2023
1 parent 6550d82 commit 4e1fe8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/heos-player.js
Expand Up @@ -1822,7 +1822,7 @@ class HeosPlayer {
if (jdata.payload.hasOwnProperty('type')) {
this.heos.setState(this.state_path + 'current_type', jdata.payload.type, true);
this.current_type = jdata.payload.type;
if (jdata.payload.type == 'station') {
if (jdata.payload.type == 'station' && jdata.payload.station !== undefined) {
this.heos.setState(this.state_path + 'current_station', jdata.payload.station, true);
} else {
this.heos.setState(this.state_path + 'current_station', '', true);
Expand Down

0 comments on commit 4e1fe8f

Please sign in to comment.