Skip to content

Commit 519e9da

Browse files
Check for existence of crypto.randomUUID
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 0db1daa commit 519e9da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/telemetry/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function captureError(
101101
customAttributes[LOG_ENTRY_ATTRIBUTE_KEYS.APP_VERSION] = appVersion;
102102

103103
// Add session ID metadata
104-
if (typeof sessionStorage !== 'undefined') {
104+
if (typeof sessionStorage !== 'undefined' && typeof crypto?.randomUUID === 'function') {
105105
try {
106106
let sessionId = sessionStorage.getItem(TELEMETRY_SESSION_ID_KEY);
107107
if (!sessionId) {

0 commit comments

Comments
 (0)