Skip to content

Commit

Permalink
fix(vuex): commit all, closes vuejs#934
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau authored and iksim committed Apr 18, 2019
1 parent f2d26ea commit 79f91d9
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 79f91d9

Please sign in to comment.