Skip to content

Commit

Permalink
ActiveDevice: don\'t try to run focus commands on a non-focus endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Feb 6, 2024
1 parent 01e8327 commit ed148ed
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/renderer/ActiveDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,19 @@ export function ActiveDevice() {
// different one.
this._cache = {};
this._storage = {};
await this.focus.supported_commands();
await this.plugins();
await this.version();
if (this.focusDetected()) {
await this.supported_commands();
await this.plugins();
await this.version();
}
};

this.supported_commands = () => {
return this.focus.supported_commands();
if (this.focusDetected()) {
return this.focus.supported_commands();
} else {
return [];
}
};

this.focusDeviceDescriptor = () => {
Expand Down

0 comments on commit ed148ed

Please sign in to comment.