diff --git a/ui/blocks/src/utils/url.ts b/ui/blocks/src/utils/url.ts index fecfbc09d..97a662088 100644 --- a/ui/blocks/src/utils/url.ts +++ b/ui/blocks/src/utils/url.ts @@ -4,7 +4,7 @@ export const getURL = () => { window.location !== window.parent.location && window.parent.location ? window.parent.location.href - : typeof document + : typeof document !== 'undefined' ? document.location.href : '') || ''; return new URL(pageURL);