Skip to content

Commit 2e8b89c

Browse files
fix: enhance bot ID initialization check in instrumentation client (calcom#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>
1 parent 7d17b44 commit 2e8b89c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/web/instrumentation-client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export function onRouterTransitionStart(url: string, navigationType: "push" | "r
5353
if (
5454
process.env.NEXT_PUBLIC_VERCEL_USE_BOTID_IN_BOOKER === "1" &&
5555
typeof window !== "undefined" &&
56-
typeof window.crypto?.getRandomValues === "function"
56+
typeof window.crypto?.getRandomValues === "function" &&
57+
typeof window.crypto?.randomUUID === "function"
5758
) {
5859
initBotId({
5960
protect: [

0 commit comments

Comments
 (0)