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>
This commit is contained in:
co-authored by
Udit Takkar
parent
7d17b443cf
commit
2e8b89c4ee
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user