diff --git a/CHANGELOG.md b/CHANGELOG.md index a423740..8857cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [OMF#93](https://github.com/ohmyform/ohmyform/issues/93) dropdown options are not saved +- redirect attempts on static export ## [0.9.2] - 2020-06-04 diff --git a/README.md b/README.md index 471819a..f169cb0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # OhMyForm UI -![Project Status](https://badgen.net/github/checks/ohmyform/ui) [![Build Status](https://travis-ci.org/ohmyform/ui.svg?branch=master)](https://travis-ci.org/ohmyform/ui) ![Latest Release](https://badgen.net/github/tag/ohmyform/ui) ![Docker Pulls](https://badgen.net/docker/pulls/ohmyform/ui) diff --git a/pages/index.tsx b/pages/index.tsx index 1fd8e56..bddb790 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -19,7 +19,7 @@ const Index: NextPage = () => { const { t } = useTranslation() useEffect(() => { - if (router.pathname !== window.location.pathname) { + if (router.pathname !== window.location.pathname && window.location.pathname.length > 2) { let href = router.asPath const as = router.asPath const possible = [/(\/form\/)[^/]+/i, /(\/admin\/forms\/)[^/]+/i, /(\/admin\/users\/)[^/]+/i] @@ -38,7 +38,9 @@ const Index: NextPage = () => { if ( publicRuntimeConfig.spa || - (process.browser && router.pathname !== window.location.pathname) + (process.browser && + router.pathname !== window.location.pathname && + window.location.pathname.length > 2) ) { return }