mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 01:35:51 +00:00
fix heroku redirects
This commit is contained in:
parent
acb26096d6
commit
d40acbbc0b
@ -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
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
# OhMyForm UI
|
||||
|
||||

|
||||
[](https://travis-ci.org/ohmyform/ui)
|
||||

|
||||

|
||||
|
||||
@ -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 <LoadingPage message={t('loading')} />
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user