We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e44151 commit bd17dd1Copy full SHA for bd17dd1
src/index.js
@@ -140,9 +140,8 @@ class Store {
140
*/
141
142
_setupModuleState (state, modules) {
143
- const { setPath } = Vue.parsers.path
144
Object.keys(modules).forEach(key => {
145
- setPath(state, key, modules[key].state || {})
+ Vue.set(state, key, modules[key].state || {})
146
})
147
}
148
@@ -155,7 +154,6 @@ class Store {
155
154
156
_setupModuleMutations (updatedModules) {
157
const modules = this._modules
158
- const { getPath } = Vue.parsers.path
159
const allMutations = [this._rootMutations]
160
Object.keys(updatedModules).forEach(key => {
161
modules[key] = updatedModules[key]
@@ -168,7 +166,7 @@ class Store {
168
166
Object.keys(module.mutations).forEach(name => {
169
167
const original = module.mutations[name]
170
mutations[name] = (state, ...args) => {
171
- original(getPath(state, key), ...args)
+ original(state[key], ...args)
172
173
174
allMutations.push(mutations)
0 commit comments