Skip to content

Commit

Permalink
prevent startup errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalopitz committed Mar 16, 2020
1 parent 6a24df2 commit 25678c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/ui/components/BrowserList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ export class BrowserList extends Component {
return (
<BrowserListItem
style={style}
key={item.id}
key={
item.id ||
`position-${position}`
}
model={item}
position={position}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/services/SonosService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 25678c9

Please sign in to comment.