Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): randomUUID does not exist in some browser version #20266

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"recharts": "^2.3.2",
"reflect-metadata": "^0.2.2",
"styled-components": "5.3.0",
"ts-proto": "^1.169.1"
"ts-proto": "^1.169.1",
"uuid":"^11.0.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
Expand Down
4 changes: 2 additions & 2 deletions dashboard/pages/heap_profiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from "@chakra-ui/react"
import Editor from "@monaco-editor/react"
import base64url from "base64url"
import { randomUUID } from "crypto"
import { v4 as uuidv4 } from 'uuid';
import Head from "next/head"
import path from "path"
import { Fragment, useEffect, useState } from "react"
Expand Down Expand Up @@ -161,7 +161,7 @@ export default function HeapProfiling() {
let objUrl = window.URL.createObjectURL(resObj.blob)
let link = document.createElement("a")
link.href = objUrl
link.download = resObj.filename || randomUUID()
link.download = resObj.filename || uuidv4()
link.click()
result = `${title}\n\nDownloaded!`
} catch (e: any) {
Expand Down
Loading