Skip to content

Commit

Permalink
fix(connect): ignore disposed error in devicelist
Browse files Browse the repository at this point in the history
  • Loading branch information
martykan authored and marekrjpolak committed Dec 3, 2024
1 parent 94a4485 commit b72300f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/connect/src/device/DeviceList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,12 @@ export class DeviceList extends TypedEmitter<DeviceListEvents> implements IDevic
const { promise, reject } = resolveAfter(1000, initParams);
this.rejectPending = reject;

return promise.then(this.createInitPromise.bind(this)).finally(() => {
this.rejectPending = undefined;
});
return promise
.then(this.createInitPromise.bind(this))
.catch(() => {})
.finally(() => {
this.rejectPending = undefined;
});
}

private async selectTransport([transport, ...rest]: Transport[]): Promise<Transport> {
Expand Down

0 comments on commit b72300f

Please sign in to comment.