Home

Issue: 1625

Cannot read property 'data' of undefined

[issue link]

i try to visiting profile route from nuxt-link

<nuxt-link class="nav-item-child nav-item-hover" :to="{name:'profile-id', params:{id: $store.state.auth.user.id}}">
                                    Profile
                                </nuxt-link>

but i get an error in my browser
image.

this is my asyncData method, $store.action & my folder structure
image

image

image

the error just happened when i click the link from nuxt-link & use this syntax context.$router.push({name: 'profile-id', params: {id: data.user.id}});
but when i do click right and open link in a new tab, the error is gone…

can anyone solve this 😦 , sorry for bad english

This question is available on Nuxt.js community (#c1451)