diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index 76f4b251ec83..325fb4ca6ab8 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -22,7 +22,7 @@ function Modal({fullscreen = true, onModalHide = () => {}, type, onModalShow = ( const hideModal = () => { setStatusBarColor(previousStatusBarColor); onModalHide(); - if (window.history.state.shouldGoBack) { + if (window.history.state?.shouldGoBack) { window.history.back(); } };