title: Vuex state is null in mutation after page refresh instead predefined object
body: <p>In a simple application, I create a simple set of mutations and actions that are tied to the component creation hook. In browser, after pressing F5, <strong>when vue-devtools opened on Vuex tab</strong> I get an error at the start of the application, although this should not happen.</p>
  
  <p>Main question: why state is 'null' and how to change it?</p>
  
  <p>store.js</p>
  
  <pre class="lang-js prettyprint-override"><code>export default new Vuex.Store({
    state: {
      a: undefined,
      b: undefined
    },
    mutations: {
      SET_A (state, a) {
        console.info(a)
        state.a = a // ← store.js?c0d6:14
      },
      SET_B (state, b) {
        state.b = b
      }
    },
    actions: {
      setA ({ commit }, a) {
        console.info(a)
        commit('SET_A', a)
      },
      setB ({ commit }, b) {
        commit('SET_B', b)
      }
    }
  })
  </code></pre>
  
  <p>Home.vue</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  // @ is an alias to /src
  import HelloWorld from '@/components/HelloWorld.vue'
  
  export default {
    name: 'home',
    components: {
      HelloWorld
    },
    created: function () {
      this.$store.dispatch('setA', 'A')
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>About.vue</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  export default {
    name: 'home',
    components: {
    },
    created: function () {
      this.$store.dispatch('setB', 'B')
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Console log on Components tab</p>
  
  <pre><code>log.js?1afd:24 [HMR] Waiting for update signal from WDS...
  store.js?c0d6:22 A
  store.js?c0d6:13 A
  backend.js:1585  vue-devtools  Detected Vue v2.6.10 
  </code></pre>
  
  <p>Console log on Vuex tab</p>
  
  <pre><code>log.js?1afd:24 [HMR] Waiting for update signal from WDS...
  store.js?c0d6:22 A
  store.js?c0d6:13 A
  backend.js:1585  vue-devtools  Detected Vue v2.6.10 
  
  store.js?c0d6:13 null
  
  backend.js:14674 Uncaught TypeError: Cannot set property 'a' of null
      at Store.SET_A (store.js?c0d6:14)
      at wrappedMutationHandler (vuex.esm.js?2ba1:725)
      at backend.js:14664
      at Array.forEach (&lt;anonymous&gt;)
      at VuexBackend.replayMutations (backend.js:14664)
      at VuexBackend.onInspectState (backend.js:14355)
      at Bridge.emit (backend.js:5472)
      at Bridge._emit (backend.js:5172)
      at backend.js:5097
      at Array.forEach (&lt;anonymous&gt;)
  SET_A @ store.js?c0d6:14
  wrappedMutationHandler @ vuex.esm.js?2ba1:725
  (anonymous) @ backend.js:14664
  replayMutations @ backend.js:14664
  onInspectState @ backend.js:14355
  emit @ backend.js:5472
  _emit @ backend.js:5172
  (anonymous) @ backend.js:5097
  (anonymous) @ backend.js:5097
  listener @ backend.js:2568
  postMessage (async)
  o @ proxy.js:1
  
  store.js?c0d6:13 null
  
  backend.js:14674 Uncaught TypeError: Cannot set property 'a' of null
      at Store.SET_A (store.js?c0d6:14)
      at wrappedMutationHandler (vuex.esm.js?2ba1:725)
      at backend.js:14664
      at Array.forEach (&lt;anonymous&gt;)
      at VuexBackend.replayMutations (backend.js:14664)
      at VuexBackend.onInspectState (backend.js:14355)
      at Bridge.emit (backend.js:5472)
      at Bridge._emit (backend.js:5172)
      at backend.js:5097
      at Array.forEach (&lt;anonymous&gt;)
  SET_A @ store.js?c0d6:14
  wrappedMutationHandler @ vuex.esm.js?2ba1:725
  (anonymous) @ backend.js:14664
  replayMutations @ backend.js:14664
  onInspectState @ backend.js:14355
  emit @ backend.js:5472
  _emit @ backend.js:5172
  (anonymous) @ backend.js:5097
  (anonymous) @ backend.js:5097
  listener @ backend.js:2568
  postMessage (async)
  o @ proxy.js:1
  
  </code></pre>