Skip to content

Commit

Permalink
fix(vuex): replay mutation no module info
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 5f5fdfa commit 6801c8c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/backend/vuex.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ export function initVuexBackend (hook, bridge, isLegacy) {
const mutation = mutations[i]
if (mutation.registerModule) {
const key = mutation.payload.path.join('/')
const registeredModule = registeredModules[key]
const moduleInfo = allTimeModules[key]
tempAddedModules.push(key)
origRegisterModule(registeredModule.path, {
...registeredModule.module,
state: parse(registeredModule.state, true)
}, registeredModule.options)
origRegisterModule(moduleInfo.path, {
...moduleInfo.module,
state: parse(moduleInfo.state, true)
}, moduleInfo.options)
updateSnapshotsVm(store.state)
} else if (mutation.unregisterModule && get(store.state, mutation.payload.path) != null) {
const path = mutation.payload.path
Expand Down

0 comments on commit 6801c8c

Please sign in to comment.