File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ class Store {
133133 }
134134
135135 /**
136- * Hot update actions and mutations .
136+ * Hot update mutations & modules .
137137 *
138138 * @param {Object } options
139139 * - {Object} [mutations]
@@ -163,13 +163,16 @@ class Store {
163163 * Bind mutations for each module to its sub tree and
164164 * merge them all into one final mutations map.
165165 *
166- * @param {Object } modules
166+ * @param {Object } updatedModules
167167 */
168168
169- _setupModuleMutations ( modules ) {
170- this . _modules = modules
169+ _setupModuleMutations ( updatedModules ) {
170+ const modules = this . _modules
171171 const { getPath } = Vue . parsers . path
172172 const allMutations = [ this . _rootMutations ]
173+ Object . keys ( updatedModules ) . forEach ( key => {
174+ modules [ key ] = updatedModules [ key ]
175+ } )
173176 Object . keys ( modules ) . forEach ( key => {
174177 const module = modules [ key ]
175178 if ( ! module || ! module . mutations ) return
You can’t perform that action at this time.
0 commit comments