We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74163a0 commit 2bb4b88Copy full SHA for 2bb4b88
src/components/search/index.tsx
@@ -33,7 +33,14 @@ algoliaInsights('init', {
33
// We dont want to track anyone cross page/sessions or use cookies
34
// so just generate a random token each time the page is loaded and
35
// treat it as a random user.
36
-const randomUserToken = crypto.randomUUID();
+const randomUserToken = (() => {
37
+ try {
38
+ return crypto.randomUUID();
39
+ } catch {
40
+ // Fallback to a simple random string if crypto.randomUUID() is not available
41
+ return Math.random().toString(36).substring(2) + Date.now().toString(36);
42
+ }
43
+})();
44
45
// this type is not exported from the global-search package
46
type SentryGlobalSearchConfig = ConstructorParameters<typeof SentryGlobalSearch>[0];
0 commit comments