Skip to content

Commit

Permalink
[build] 3.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn committed Mar 9, 2020
1 parent 810a360 commit ac8a486
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 34 deletions.
16 changes: 9 additions & 7 deletions dist/vuex.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vuex v3.1.2
* (c) 2019 Evan You
* vuex v3.1.3
* (c) 2020 Evan You
* @license MIT
*/
'use strict';
Expand Down Expand Up @@ -394,7 +394,10 @@ Store.prototype.commit = function commit (_type, _payload, _options) {
handler(payload);
});
});
this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });

this._subscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.forEach(function (sub) { return sub(mutation, this$1.state); });

if (
process.env.NODE_ENV !== 'production' &&
Expand Down Expand Up @@ -426,6 +429,7 @@ Store.prototype.dispatch = function dispatch (_type, _payload) {

try {
this._actionSubscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.filter(function (sub) { return sub.before; })
.forEach(function (sub) { return sub.before(action, this$1.state); });
} catch (e) {
Expand Down Expand Up @@ -794,9 +798,7 @@ function enableStrictMode (store) {
}

function getNestedState (state, path) {
return path.length
? path.reduce(function (state, key) { return state[key]; }, state)
: state
return path.reduce(function (state, key) { return state[key]; }, state)
}

function unifyObjectStyle (type, payload, options) {
Expand Down Expand Up @@ -1039,7 +1041,7 @@ function getModuleByNamespace (store, helper, namespace) {
var index = {
Store: Store,
install: install,
version: '3.1.2',
version: '3.1.3',
mapState: mapState,
mapMutations: mapMutations,
mapGetters: mapGetters,
Expand Down
16 changes: 9 additions & 7 deletions dist/vuex.esm.browser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vuex v3.1.2
* (c) 2019 Evan You
* vuex v3.1.3
* (c) 2020 Evan You
* @license MIT
*/
function applyMixin (Vue) {
Expand Down Expand Up @@ -382,7 +382,10 @@ class Store {
handler(payload);
});
});
this._subscribers.forEach(sub => sub(mutation, this.state));

this._subscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.forEach(sub => sub(mutation, this.state));

if (
options && options.silent
Expand Down Expand Up @@ -412,6 +415,7 @@ class Store {

try {
this._actionSubscribers
.slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
.filter(sub => sub.before)
.forEach(sub => sub.before(action, this.state));
} catch (e) {
Expand Down Expand Up @@ -769,9 +773,7 @@ function enableStrictMode (store) {
}

function getNestedState (state, path) {
return path.length
? path.reduce((state, key) => state[key], state)
: state
return path.reduce((state, key) => state[key], state)
}

function unifyObjectStyle (type, payload, options) {
Expand Down Expand Up @@ -996,7 +998,7 @@ function getModuleByNamespace (store, helper, namespace) {
var index_esm = {
Store,
install,
version: '3.1.2',
version: '3.1.3',
mapState,
mapMutations,
mapGetters,
Expand Down
Loading

0 comments on commit ac8a486

Please sign in to comment.