Skip to content

Commit 3e155c1

Browse files
committed
fix(3742): remove unnecessary normalization of bit
1 parent c650ada commit 3e155c1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/remote-feature-flag-controller/src/utils/user-segmentation-utils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ export function generateDeterministicRandomNumber(
3131
let cleanId: string, value: bigint;
3232
// uuidv4 format
3333
if (uuidValidate(metaMetricsId) && uuidVersion(metaMetricsId) === 4) {
34-
cleanId = metaMetricsId
35-
.replace(/^(.{12})4/u, '$1f')
36-
.replace(/(.{16})[89ab]/u, '$1f')
37-
.replace(/-/gu, '');
34+
cleanId = metaMetricsId.replace(/^(.{12})4/u, '$1f').replace(/-/gu, '');
3835
value = BigInt(`0x${cleanId}`);
3936
} else {
4037
// hex format with 0x prefix

0 commit comments

Comments
 (0)