Skip to content

Commit 6232eac

Browse files
committed
fix: Avoid mutating scan options object (#799, #803)
Properties on this options object are replaced with encoded versions. By modifying the options object in-place, it was not possible to make subsequent calls with the same object.
1 parent d8d2663 commit 6232eac

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/bleClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ class BleClientClass implements BleClientInterface {
712712
}
713713

714714
private validateRequestBleDeviceOptions(options: RequestBleDeviceOptions): RequestBleDeviceOptions {
715+
options = { ...options };
715716
if (options.services) {
716717
options.services = options.services.map(parseUUID);
717718
}

0 commit comments

Comments
 (0)