I get the expected data every time I load a page for the first time, but when i refresh my pages the store doesnt get data from the middleware please help: this is my middleware, it gets a persons information and commits data to the AddViewedPerson state, but for some reason i get empty results when I do a page refresh
export default function({params,store}){
return axios.get(`/api/getAddresses/${params.view}`)
.then((response) => {
store.commit('addAddresses', response.data)
return axios.get(`/api/getTelephones/${params.view}`)
.then((response) => {
store.commit('addTelephones', response.data)
return axios.get(`/api/personInformation/${params.view}`)
.then((response) => {
store.commit('AddViewedPerson', response.data)
return axios.get(`/api/personCountry/${params.view}`)
.then((response) => {
store.commit('addCountry', response.data)
})
})
})
})
} in my main page I have something like this: v-for="personal in $store.state.viewedPerson"
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2711">#c2711</a>)</em></sub></div>