From 9ec14ccbee35b95abbd02d4518cf99b1390b575a Mon Sep 17 00:00:00 2001 From: simodrws Date: Fri, 26 May 2023 16:29:27 +0200 Subject: [PATCH] fix: last remaining window destructure --- src/components/modal/modal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 4c2744ec..c36a4a86 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -4,6 +4,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import { useMasa } from '../../provider'; function getWindowDimensions() { + if (typeof window === 'undefined') return { width: 0, height: 0 }; const { innerWidth: width, innerHeight: height } = window; return { width,