提交 39b21be9 编写于 作者: G Guillaume Chau

fix(vuex): issue when state snapshot already existed

上级 111a5e24
......@@ -41,7 +41,7 @@ export function initVuexBackend (hook, bridge, isLegacy) {
resetSnapshotCache()
}
function resetSnapshotCache (force = true) {
function resetSnapshotCache () {
stateSnapshots = [
{ index: -1, state: baseStateSnapshot }
]
......@@ -225,6 +225,10 @@ export function initVuexBackend (hook, bridge, isLegacy) {
// Snapshot was already replayed
if (stateSnapshot.index === index) {
resultState = stateSnapshot.state
const state = parse(stateSnapshot.state, true)
updateSnapshotsVm(state)
store.replaceState(state)
} else {
const startMutation = mutations[stateSnapshot.index]
if (startMutation) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册