Skip to content

Commit 3134a26

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 dbd0fef commit 3134a26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)