From a0270b1546675fea331b60339055534d355c5736 Mon Sep 17 00:00:00 2001 From: Tomas Martykan Date: Tue, 3 Dec 2024 11:34:25 +0100 Subject: [PATCH] fix(connect): ignore disposed error in devicelist --- packages/connect/src/device/DeviceList.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/connect/src/device/DeviceList.ts b/packages/connect/src/device/DeviceList.ts index ce261e51f99..81e8e34bd7a 100644 --- a/packages/connect/src/device/DeviceList.ts +++ b/packages/connect/src/device/DeviceList.ts @@ -268,9 +268,12 @@ export class DeviceList extends TypedEmitter 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 {