|
@@ -1,5 +1,5 @@
|
|
|
/**
|
|
|
- * vuex v2.2.1
|
|
|
+ * vuex v2.3.0
|
|
|
* (c) 2017 Evan You
|
|
|
* @license MIT
|
|
|
*/
|
|
@@ -100,13 +100,11 @@ var Module = function Module (rawModule, runtime) {
|
|
|
this.runtime = runtime;
|
|
|
this._children = Object.create(null);
|
|
|
this._rawModule = rawModule;
|
|
|
+ var rawState = rawModule.state;
|
|
|
+ this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
|
|
|
};
|
|
|
|
|
|
-var prototypeAccessors$1 = { state: {},namespaced: {} };
|
|
|
-
|
|
|
-prototypeAccessors$1.state.get = function () {
|
|
|
- return this._rawModule.state || {}
|
|
|
-};
|
|
|
+var prototypeAccessors$1 = { namespaced: {} };
|
|
|
|
|
|
prototypeAccessors$1.namespaced.get = function () {
|
|
|
return !!this._rawModule.namespaced
|
|
@@ -470,7 +468,7 @@ function installModule (store, rootState, path, module, hot) {
|
|
|
var namespace = store._modules.getNamespace(path);
|
|
|
|
|
|
// register in namespace map
|
|
|
- if (namespace) {
|
|
|
+ if (module.namespaced) {
|
|
|
store._modulesNamespaceMap[namespace] = module;
|
|
|
}
|
|
|
|
|
@@ -793,7 +791,7 @@ function getModuleByNamespace (store, helper, namespace) {
|
|
|
var index_esm = {
|
|
|
Store: Store,
|
|
|
install: install,
|
|
|
- version: '2.2.1',
|
|
|
+ version: '2.3.0',
|
|
|
mapState: mapState,
|
|
|
mapMutations: mapMutations,
|
|
|
mapGetters: mapGetters,
|