Skip to content

Commit 8081fcd

Browse files
committed
[build] 2.3.0
1 parent a86bd2d commit 8081fcd

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

dist/vuex.esm.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vuex v2.2.1
2+
* vuex v2.3.0
33
* (c) 2017 Evan You
44
* @license MIT
55
*/
@@ -100,13 +100,11 @@ var Module = function Module (rawModule, runtime) {
100100
this.runtime = runtime;
101101
this._children = Object.create(null);
102102
this._rawModule = rawModule;
103+
var rawState = rawModule.state;
104+
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
103105
};
104106

105-
var prototypeAccessors$1 = { state: {},namespaced: {} };
106-
107-
prototypeAccessors$1.state.get = function () {
108-
return this._rawModule.state || {}
109-
};
107+
var prototypeAccessors$1 = { namespaced: {} };
110108

111109
prototypeAccessors$1.namespaced.get = function () {
112110
return !!this._rawModule.namespaced
@@ -470,7 +468,7 @@ function installModule (store, rootState, path, module, hot) {
470468
var namespace = store._modules.getNamespace(path);
471469

472470
// register in namespace map
473-
if (namespace) {
471+
if (module.namespaced) {
474472
store._modulesNamespaceMap[namespace] = module;
475473
}
476474

@@ -793,7 +791,7 @@ function getModuleByNamespace (store, helper, namespace) {
793791
var index_esm = {
794792
Store: Store,
795793
install: install,
796-
version: '2.2.1',
794+
version: '2.3.0',
797795
mapState: mapState,
798796
mapMutations: mapMutations,
799797
mapGetters: mapGetters,

dist/vuex.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vuex v2.2.1
2+
* vuex v2.3.0
33
* (c) 2017 Evan You
44
* @license MIT
55
*/
@@ -106,13 +106,11 @@ var Module = function Module (rawModule, runtime) {
106106
this.runtime = runtime;
107107
this._children = Object.create(null);
108108
this._rawModule = rawModule;
109+
var rawState = rawModule.state;
110+
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
109111
};
110112

111-
var prototypeAccessors$1 = { state: {},namespaced: {} };
112-
113-
prototypeAccessors$1.state.get = function () {
114-
return this._rawModule.state || {}
115-
};
113+
var prototypeAccessors$1 = { namespaced: {} };
116114

117115
prototypeAccessors$1.namespaced.get = function () {
118116
return !!this._rawModule.namespaced
@@ -476,7 +474,7 @@ function installModule (store, rootState, path, module, hot) {
476474
var namespace = store._modules.getNamespace(path);
477475

478476
// register in namespace map
479-
if (namespace) {
477+
if (module.namespaced) {
480478
store._modulesNamespaceMap[namespace] = module;
481479
}
482480

@@ -799,7 +797,7 @@ function getModuleByNamespace (store, helper, namespace) {
799797
var index = {
800798
Store: Store,
801799
install: install,
802-
version: '2.2.1',
800+
version: '2.3.0',
803801
mapState: mapState,
804802
mapMutations: mapMutations,
805803
mapGetters: mapGetters,

0 commit comments

Comments
 (0)