Skip to content

Commit

Permalink
fix(vuex): commit all, closes #934
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Mar 28, 2019
1 parent 379eb68 commit 825d673
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/vuex.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export function initVuexBackend (hook, bridge, isLegacy) {

updateSnapshotsVm()

function reset () {
baseStateSnapshot = getStateSnapshot(hook.initialStore)
function reset (stateSnapshot = null) {
baseStateSnapshot = stateSnapshot || getStateSnapshot(hook.initialStore)
mutations = []
resetSnapshotCache()
}
Expand Down Expand Up @@ -174,7 +174,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
})

bridge.on('vuex:commit-all', () => {
reset()
reset(lastState)
})

bridge.on('vuex:revert-all', () => {
Expand Down

0 comments on commit 825d673

Please sign in to comment.