Przeglądaj źródła

fix devtools time travel

Evan You 9 lat temu
rodzic
commit
6c0273ca73
1 zmienionych plików z 1 dodań i 4 usunięć
  1. 1 4
      src/middlewares/devtool.js

+ 1 - 4
src/middlewares/devtool.js

@@ -7,11 +7,8 @@ export default {
     if (!hook) return
     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._vm.state = targetState
       store._dispatching = false
     })
   },