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 <[email protected]>
This commit is contained in:
1 parent
7d17b443cf
commit
2e8b89c4ee
1 file changed
+2
-1
@@ -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