diff --git a/package-lock.json b/package-lock.json index 90c4bd9e..482d57c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@vueuse/head": "^2.0.0", "ajv": "^8.12.0", "autoprefixer": "^10.4.17", - "biketag": "^3.3.2", + "biketag": "^3.3.3", "bootstrap": "^5.3.2", "bootstrap-vue-next": "^0.15.5", "crypto-js": "^4.2.0", @@ -6529,9 +6529,9 @@ ] }, "node_modules/biketag": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/biketag/-/biketag-3.3.2.tgz", - "integrity": "sha512-3Cgxy/pmwwcYjKl0ISUEckk4112WQdJeEWL69akTWK0rTbSUhwqJzpzWGEMAgXfdWsPfP1oOvG/MwUJ9DGy5UQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/biketag/-/biketag-3.3.3.tgz", + "integrity": "sha512-PyaD4Cv4qDul67I6fgdRpDe2mSW1E7G5CX1i8Z+KwxiENIRk+HugUA5M35FN56b2ThhkDwcapEsWUkD/dlDKtg==", "dependencies": { "@sanity/client": "2.25.1-feature-image-file-input-refactor.150", "axios": "^0.21.1", diff --git a/package.json b/package.json index 60c708ad..7d62c5dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "biketag-vue", - "version": "3.3.2", + "version": "3.3.3", "license": "AGPL-3.0-or-later", "author": "Ken Eucker", "bugs": { @@ -31,7 +31,7 @@ "@vueuse/head": "^2.0.0", "ajv": "^8.12.0", "autoprefixer": "^10.4.17", - "biketag": "^3.3.2", + "biketag": "^3.3.3", "bootstrap": "^5.3.2", "bootstrap-vue-next": "^0.15.5", "crypto-js": "^4.2.0", diff --git a/src/App.vue b/src/App.vue index c5aaecff..bb0313b3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -138,17 +138,22 @@ function checkForNewBikeTagPost() { async function created() { const initResults = [] /// Set it first thing + await router.isReady() const _gameIsSet = store.gameName?.length !== 0 - if (_gameIsSet && router.currentRoute.value.name !== 'landing') { + const routeIsRoot = router.currentRoute.value.path === '/' + const routeIsLanding = router.currentRoute.value.name === 'Landing' + + if (_gameIsSet && (!routeIsLanding || routeIsRoot)) { const game = await store.setGame().catch((err) => { debug('view::data-init', err) // router.push('/landing') }) gameIsSet.value = true + const routeIsHome = routeIsRoot ? true : router.currentRoute.value?.name === 'Home' initResults.push(await store.fetchCurrentBikeTag()) - if (game) { + if (game && routeIsHome) { await router.push({ name: 'Home' }) }