Skip to content

Commit

Permalink
Fix for init issues on first action appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
mthiel committed Dec 17, 2024
1 parent 6f5624b commit 30c6595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/actions/power.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/actions/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30c6595

Please sign in to comment.