Skip to content

Commit 3f683f6

Browse files
Update removeAllDevices.
1 parent b8c53b3 commit 3f683f6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/bluetooth/BluetoothManager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ export class BluetoothManager implements IBluetoothManager {
8181

8282
removeAllDevices(deviceList: Array<BluetoothManager.Device>) {
8383
for (const device of deviceList) {
84-
this._removeDeviceFromList(device);
84+
const index = this._deviceList.indexOf(device);
85+
if (index > -1) {
86+
this._deviceList.splice(index, 1);
87+
this._identifierRegistry.splice(index, 1);
88+
device.dispose();
89+
}
8590
}
8691
this.deviceListChanged.emit(this._deviceList);
8792
}

0 commit comments

Comments
 (0)