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 a7a775b commit bb8ba9eCopy full SHA for bb8ba9e
src/store.js
@@ -140,6 +140,8 @@ export class Store {
140
registerModule (path, rawModule) {
141
if (typeof path === 'string') path = [path]
142
assert(Array.isArray(path), `module path must be a string or an Array.`)
143
+ assert(path.length > 0, 'cannot register the root module by using registerModule.')
144
+
145
this._modules.register(path, rawModule)
146
installModule(this, this.state, path, this._modules.get(path))
147
// reset store to update getters...
0 commit comments