Explorar o código

make sure devtool state travel work with strict mode

Evan You %!s(int64=9) %!d(string=hai) anos
pai
achega
c5f1c0675f
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/middlewares/devtool.js

+ 2 - 0
src/middlewares/devtool.js

@@ -8,9 +8,11 @@ export default {
     hook.emit('vuex:init', store)
     hook.on('vuex:travel-to-state', targetState => {
       const currentState = store._vm._data
+      store._dispatching = true
       Object.keys(targetState).forEach(key => {
         currentState[key] = targetState[key]
       })
+      store._dispatching = false
     })
   },
   onMutation (mutation, state) {