Skip to content

Commit

Permalink
Strip out unused options object
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed Jul 25, 2024
1 parent 4329661 commit d912416
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/project/project-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ActionFeedback } from "../common/use-action-feedback";
import { Dialogs } from "../common/use-dialogs";
import {
ConnectionStatus,
ConnectOptions,
DeviceConnection,
AfterRequestDevice,
FlashDataError,
Expand Down Expand Up @@ -140,7 +139,7 @@ export class ProjectActions {
this.webusbNotSupportedError(finalFocusRef);
} else {
if (await this.showConnectHelp(forceConnectHelp, finalFocusRef)) {
return this.connectInternal({}, userAction, finalFocusRef);
return this.connectInternal(userAction, finalFocusRef);
}
}
};
Expand Down Expand Up @@ -190,12 +189,11 @@ export class ProjectActions {
* Connect to the device if possible, otherwise show feedback.
*/
private async connectInternal(
options: ConnectOptions,
userAction: ConnectionAction,
finalFocusRef: FinalFocusRef
) {
try {
await this.device.connect(options);
await this.device.connect();
finalFocusRef?.current?.focus();
return true;
} catch (e) {
Expand Down

0 comments on commit d912416

Please sign in to comment.