try to make redirect work properly

This commit is contained in:
polv committed 2020-12-17 19:21:20 +07:00
1 parent 1347796dbd
commit f76b1fec34
2 files changed
+5 -5

No files matched your search

+5 -1
View File
@@ -7,7 +7,11 @@ import { Vue, Component } from 'nuxt-property-decorator'
@Component<BlogPage>({
async asyncData({ $axios }) {
const { result, count } = (await $axios.$get('/api/q')) || {}
if (process.static && typeof location !== 'undefined') {
location.reload()
}
const { result, count } = await $axios.$get('/api/q')
return {
posts: result,