diff --git a/src/components/bookmarks-panel/bookmarks-panel.tsx b/src/components/bookmarks-panel/bookmarks-panel.tsx index 0902b142..6246e962 100644 --- a/src/components/bookmarks-panel/bookmarks-panel.tsx +++ b/src/components/bookmarks-panel/bookmarks-panel.tsx @@ -42,6 +42,12 @@ enum PopoverType { none, } +Object.defineProperty(globalThis, "crypto", { + value: { + randomUUID: () => "", + }, +}); + const Container = styled.div` position: absolute; background: ${({ theme }) => theme.colors.mainCanvasColor}; diff --git a/src/components/layers-panel/insert-panel/insert-panel.tsx b/src/components/layers-panel/insert-panel/insert-panel.tsx index b05da128..fffeb647 100644 --- a/src/components/layers-panel/insert-panel/insert-panel.tsx +++ b/src/components/layers-panel/insert-panel/insert-panel.tsx @@ -27,6 +27,12 @@ import { import { UploadPanel } from "../../upload-panel/upload-panel"; import { getLayerUrl } from "../../../utils/layer-utils"; +Object.defineProperty(globalThis, "crypto", { + value: { + randomUUID: () => "", + }, +}); + const NO_NAME_ERROR = "Please enter name"; const INVALID_URL_ERROR = "Invalid URL"; diff --git a/src/components/upload-panel/upload-panel.spec.tsx b/src/components/upload-panel/upload-panel.spec.tsx index 0a988cc7..0d1c6d30 100644 --- a/src/components/upload-panel/upload-panel.spec.tsx +++ b/src/components/upload-panel/upload-panel.spec.tsx @@ -15,6 +15,12 @@ jest.mock("@hyperjump/json-schema", () => ({ ), })); +Object.defineProperty(globalThis, "crypto", { + value: { + randomUUID: () => "", + }, +}); + const onCancel = jest.fn(); const onFileUploaded = jest.fn();