Skip to content

Commit c5f1c06

Browse files
committed
make sure devtool state travel work with strict mode
1 parent 83c1aa5 commit c5f1c06

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/middlewares/devtool.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export default {
88
hook.emit('vuex:init', store)
99
hook.on('vuex:travel-to-state', targetState => {
1010
const currentState = store._vm._data
11+
store._dispatching = true
1112
Object.keys(targetState).forEach(key => {
1213
currentState[key] = targetState[key]
1314
})
15+
store._dispatching = false
1416
})
1517
},
1618
onMutation (mutation, state) {

0 commit comments

Comments
 (0)