Skip to content

Commit 6b0014c

Browse files
committed
release: v3.5.1
1 parent a477334 commit 6b0014c

9 files changed

+84
-18
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [3.5.1](https://github.com/vuejs/vuex/compare/v3.5.0...v3.5.1) (2020-06-29)
2+
3+
4+
### Bug Fixes
5+
6+
* **types:** add missing `logger.d.ts` file to the package ([#1789](https://github.com/vuejs/vuex/issues/1789)) ([a477334](https://github.com/vuejs/vuex/commit/a477334b909913f6a92bdbedcf4a3016a62eab7a))
7+
* warn when unregistering non existing module ([#1786](https://github.com/vuejs/vuex/issues/1786)) ([7cec79d](https://github.com/vuejs/vuex/commit/7cec79d339b874ec41f35891c891dfd27460c1d3))
8+
9+
10+
111
# [3.5.0](https://github.com/vuejs/vuex/compare/v3.4.0...v3.5.0) (2020-06-29)
212

313

dist/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vuex v3.5.0
2+
* vuex v3.5.1
33
* (c) 2020 Evan You
44
* @license MIT
55
*/

dist/vuex.common.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vuex v3.5.0
2+
* vuex v3.5.1
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -265,7 +265,21 @@ ModuleCollection.prototype.register = function register (path, rawModule, runtim
265265
ModuleCollection.prototype.unregister = function unregister (path) {
266266
var parent = this.get(path.slice(0, -1));
267267
var key = path[path.length - 1];
268-
if (!parent.getChild(key).runtime) { return }
268+
var child = parent.getChild(key);
269+
270+
if (!child) {
271+
if ((process.env.NODE_ENV !== 'production')) {
272+
console.warn(
273+
"[vuex] trying to unregister module '" + key + "', which is " +
274+
"not registered"
275+
);
276+
}
277+
return
278+
}
279+
280+
if (!child.runtime) {
281+
return
282+
}
269283

270284
parent.removeChild(key);
271285
};
@@ -1214,7 +1228,7 @@ function pad (num, maxLength) {
12141228
var index_cjs = {
12151229
Store: Store,
12161230
install: install,
1217-
version: '3.5.0',
1231+
version: '3.5.1',
12181232
mapState: mapState,
12191233
mapMutations: mapMutations,
12201234
mapGetters: mapGetters,

dist/vuex.esm.browser.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vuex v3.5.0
2+
* vuex v3.5.1
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -255,7 +255,21 @@ class ModuleCollection {
255255
unregister (path) {
256256
const parent = this.get(path.slice(0, -1));
257257
const key = path[path.length - 1];
258-
if (!parent.getChild(key).runtime) return
258+
const child = parent.getChild(key);
259+
260+
if (!child) {
261+
{
262+
console.warn(
263+
`[vuex] trying to unregister module '${key}', which is ` +
264+
`not registered`
265+
);
266+
}
267+
return
268+
}
269+
270+
if (!child.runtime) {
271+
return
272+
}
259273

260274
parent.removeChild(key);
261275
}
@@ -1169,7 +1183,7 @@ function pad (num, maxLength) {
11691183
var index = {
11701184
Store,
11711185
install,
1172-
version: '3.5.0',
1186+
version: '3.5.1',
11731187
mapState,
11741188
mapMutations,
11751189
mapGetters,

dist/vuex.esm.browser.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vuex.esm.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vuex v3.5.0
2+
* vuex v3.5.1
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -263,7 +263,21 @@ ModuleCollection.prototype.register = function register (path, rawModule, runtim
263263
ModuleCollection.prototype.unregister = function unregister (path) {
264264
var parent = this.get(path.slice(0, -1));
265265
var key = path[path.length - 1];
266-
if (!parent.getChild(key).runtime) { return }
266+
var child = parent.getChild(key);
267+
268+
if (!child) {
269+
if ((process.env.NODE_ENV !== 'production')) {
270+
console.warn(
271+
"[vuex] trying to unregister module '" + key + "', which is " +
272+
"not registered"
273+
);
274+
}
275+
return
276+
}
277+
278+
if (!child.runtime) {
279+
return
280+
}
267281

268282
parent.removeChild(key);
269283
};
@@ -1212,7 +1226,7 @@ function pad (num, maxLength) {
12121226
var index = {
12131227
Store: Store,
12141228
install: install,
1215-
version: '3.5.0',
1229+
version: '3.5.1',
12161230
mapState: mapState,
12171231
mapMutations: mapMutations,
12181232
mapGetters: mapGetters,

dist/vuex.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vuex v3.5.0
2+
* vuex v3.5.1
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -269,7 +269,21 @@
269269
ModuleCollection.prototype.unregister = function unregister (path) {
270270
var parent = this.get(path.slice(0, -1));
271271
var key = path[path.length - 1];
272-
if (!parent.getChild(key).runtime) { return }
272+
var child = parent.getChild(key);
273+
274+
if (!child) {
275+
{
276+
console.warn(
277+
"[vuex] trying to unregister module '" + key + "', which is " +
278+
"not registered"
279+
);
280+
}
281+
return
282+
}
283+
284+
if (!child.runtime) {
285+
return
286+
}
273287

274288
parent.removeChild(key);
275289
};
@@ -1218,7 +1232,7 @@
12181232
var index_cjs = {
12191233
Store: Store,
12201234
install: install,
1221-
version: '3.5.0',
1235+
version: '3.5.1',
12221236
mapState: mapState,
12231237
mapMutations: mapMutations,
12241238
mapGetters: mapGetters,

dist/vuex.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuex",
3-
"version": "3.5.0",
3+
"version": "3.5.1",
44
"description": "state management for Vue.js",
55
"main": "dist/vuex.common.js",
66
"module": "dist/vuex.esm.js",

0 commit comments

Comments
 (0)