Static GitHub Issues

[2557] Unable to access Store in mounted hook after page refresh

prev: Nested node_modules are ignored.
next: Redirect error in spa mode.

This is on a page. I am logging for this.$store. The store works when you click around but when i refresh the page the store is blank.

  mounted () {
    console.log(this.$store.getters.getCartId) 
    axios.get(url + this.$store.getters.getCartId).then(res => {
      // do something
    })
  }
<!--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/c2223">#c2223</a>)</em></sub></div>