From 2e8b89c4ee02529e02fa3e5eb5badd3118720523 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Thu, 6 Nov 2025 17:30:31 +0530 Subject: [PATCH] fix: enhance bot ID initialization check in instrumentation client (#24961) - Add additional check for the presence of window.crypto.randomUUID function - Ensures compatibility with environments that support both getRandomValues and randomUUID Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> --- apps/web/instrumentation-client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/instrumentation-client.ts b/apps/web/instrumentation-client.ts index dfc63ad88b..20bd096f2e 100644 --- a/apps/web/instrumentation-client.ts +++ b/apps/web/instrumentation-client.ts @@ -53,7 +53,8 @@ export function onRouterTransitionStart(url: string, navigationType: "push" | "r if ( process.env.NEXT_PUBLIC_VERCEL_USE_BOTID_IN_BOOKER === "1" && typeof window !== "undefined" && - typeof window.crypto?.getRandomValues === "function" + typeof window.crypto?.getRandomValues === "function" && + typeof window.crypto?.randomUUID === "function" ) { initBotId({ protect: [