From 25678c902d338a6b9b150cebd28015d603b79d30 Mon Sep 17 00:00:00 2001 From: Pascal Opitz Date: Mon, 16 Mar 2020 10:51:05 +1030 Subject: [PATCH] prevent startup errors --- src/ui/components/BrowserList.jsx | 5 ++++- src/ui/services/SonosService.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui/components/BrowserList.jsx b/src/ui/components/BrowserList.jsx index bb15451..2430ef2 100644 --- a/src/ui/components/BrowserList.jsx +++ b/src/ui/components/BrowserList.jsx @@ -188,7 +188,10 @@ export class BrowserList extends Component { return ( diff --git a/src/ui/services/SonosService.js b/src/ui/services/SonosService.js index 959ea5b..b0f2441 100644 --- a/src/ui/services/SonosService.js +++ b/src/ui/services/SonosService.js @@ -446,7 +446,7 @@ const SonosService = { { const lastChange = xml2json(data.LastChange); - if (subscription) { + if (subscription && this._currentDevice) { const transportState = subscription.sonos.translateState( lastChange.Event.InstanceID.TransportState.$.val );