Skip to content

Commit

Permalink
Update ZpService.js
Browse files Browse the repository at this point in the history
Bug fix: TypeError when platform coordinator zone player goes missing, see #209.
  • Loading branch information
ebaauw committed Dec 11, 2023
1 parent 4760baf commit 0eddaf5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ZpService.js
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ class Tv extends ZpService {
}

const platformCoordinatorId = this.sonosValues.platformCoordinatorId
const zpClient = this.platform.zpClients[platformCoordinatorId]
let configuredName = 'n/a'
let uri
let visible = false
Expand All @@ -1227,9 +1228,9 @@ class Tv extends ZpService {
visible = true
} else if (
platformCoordinatorId != null &&
platformCoordinatorId !== this.zpClient.id
platformCoordinatorId !== this.zpClient.id &&
zpClient != null
) {
const zpClient = this.platform.zpClients[platformCoordinatorId]
configuredName = 'Join ' + zpClient.zoneGroupShortName
uri = 'x-rincon:' + platformCoordinatorId
visible = true
Expand Down

0 comments on commit 0eddaf5

Please sign in to comment.