File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ class Store {
133
133
}
134
134
135
135
/**
136
- * Hot update actions and mutations .
136
+ * Hot update mutations & modules .
137
137
*
138
138
* @param {Object } options
139
139
* - {Object} [mutations]
@@ -163,13 +163,16 @@ class Store {
163
163
* Bind mutations for each module to its sub tree and
164
164
* merge them all into one final mutations map.
165
165
*
166
- * @param {Object } modules
166
+ * @param {Object } updatedModules
167
167
*/
168
168
169
- _setupModuleMutations ( modules ) {
170
- this . _modules = modules
169
+ _setupModuleMutations ( updatedModules ) {
170
+ const modules = this . _modules
171
171
const { getPath } = Vue . parsers . path
172
172
const allMutations = [ this . _rootMutations ]
173
+ Object . keys ( updatedModules ) . forEach ( key => {
174
+ modules [ key ] = updatedModules [ key ]
175
+ } )
173
176
Object . keys ( modules ) . forEach ( key => {
174
177
const module = modules [ key ]
175
178
if ( ! module || ! module . mutations ) return
You can’t perform that action at this time.
0 commit comments