Skip to content

Commit 81d7413

Browse files
committed
fix(ble): make iBeacon UUID filter not sensitive to casing
1 parent 21546d3 commit 81d7413

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/internal/ble/provider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function fixScanningOptions<T extends ScanningOptions>(options: T): T {
8888
if (copy.iBeaconUuids === undefined) {
8989
copy.iBeaconUuids = [];
9090
}
91+
copy.iBeaconUuids = copy.iBeaconUuids.map((uuid) => uuid.toLowerCase());
9192
return copy;
9293
}
9394

@@ -97,7 +98,7 @@ function filterByUuid(
9798
): BleScanResult {
9899
if (uuids.length === 0) return results;
99100
const filteredSeen = results.seen.filter(
100-
(info) => info.iBeacon && uuids.includes(info.iBeacon.uuid)
101+
(info) => info.iBeacon && uuids.includes(info.iBeacon.uuid.toLowerCase())
101102
);
102103
if (filteredSeen.length === 0) return null;
103104
return { ...results, seen: filteredSeen };

0 commit comments

Comments
 (0)