diff --git a/src/actions/power.js b/src/actions/power.js index 7e1c4eb..606f302 100644 --- a/src/actions/power.js +++ b/src/actions/power.js @@ -23,7 +23,7 @@ export class PowerAction extends PluginAction { await super.onWillAppear(ev); // If there's no connection yet, there's nothing to do - const connection = this.avrConnections[this.actionReceiverMap[ev.action.id].uuid]; + const connection = this.avrConnections[this.actionReceiverMap[ev.action.id]?.uuid]; if (!connection) return; // Set the initial state of the action based on the receiver's power status diff --git a/src/actions/volume.js b/src/actions/volume.js index 13a7aad..71bc85e 100644 --- a/src/actions/volume.js +++ b/src/actions/volume.js @@ -32,7 +32,7 @@ export class VolumeAction extends PluginAction { await super.onWillAppear(ev); // If there's no connection yet, there's nothing to do - const connection = this.avrConnections[this.actionReceiverMap[ev.action.id].uuid]; + const connection = this.avrConnections[this.actionReceiverMap[ev.action.id]?.uuid]; if (!connection) return; // Set the initial state of the action based on the receiver's volume & mute status