Skip to content

Commit 6c0273c

Browse files
committed
fix devtools time travel
1 parent f61ba18 commit 6c0273c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/middlewares/devtool.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ export default {
77
if (!hook) return
88
hook.emit('vuex:init', store)
99
hook.on('vuex:travel-to-state', targetState => {
10-
const currentState = store._vm._data
1110
store._dispatching = true
12-
Object.keys(targetState).forEach(key => {
13-
currentState[key] = targetState[key]
14-
})
11+
store._vm.state = targetState
1512
store._dispatching = false
1613
})
1714
},

0 commit comments

Comments
 (0)