Skip to content

Commit 02d2488

Browse files
committed
build: bundle 3.1.6
1 parent f2024d5 commit 02d2488

6 files changed

+36
-20
lines changed

Diff for: dist/vue-router.common.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.1.5
2+
* vue-router v3.1.6
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -944,7 +944,8 @@ function fillParams (
944944
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
945945

946946
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
947-
if (params.pathMatch) { params[0] = params.pathMatch; }
947+
// and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
948+
if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
948949

949950
return filler(params, { pretty: true })
950951
} catch (e) {
@@ -1692,7 +1693,10 @@ function setupScroll () {
16921693
// location.host contains the port and location.hostname doesn't
16931694
var protocolAndPath = window.location.protocol + '//' + window.location.host;
16941695
var absolutePath = window.location.href.replace(protocolAndPath, '');
1695-
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
1696+
// preserve existing history state as it could be overriden by the user
1697+
var stateCopy = extend({}, window.history.state);
1698+
stateCopy.key = getStateKey();
1699+
window.history.replaceState(stateCopy, '', absolutePath);
16961700
window.addEventListener('popstate', function (e) {
16971701
saveScrollPosition();
16981702
if (e.state && e.state.key) {
@@ -2907,7 +2911,7 @@ function createHref (base, fullPath, mode) {
29072911
}
29082912

29092913
VueRouter.install = install;
2910-
VueRouter.version = '3.1.5';
2914+
VueRouter.version = '3.1.6';
29112915

29122916
if (inBrowser && window.Vue) {
29132917
window.Vue.use(VueRouter);

Diff for: dist/vue-router.esm.browser.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.1.5
2+
* vue-router v3.1.6
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -928,7 +928,8 @@ function fillParams (
928928
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
929929

930930
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
931-
if (params.pathMatch) params[0] = params.pathMatch;
931+
// and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
932+
if (typeof params.pathMatch === 'string') params[0] = params.pathMatch;
932933

933934
return filler(params, { pretty: true })
934935
} catch (e) {
@@ -1668,7 +1669,10 @@ function setupScroll () {
16681669
// location.host contains the port and location.hostname doesn't
16691670
const protocolAndPath = window.location.protocol + '//' + window.location.host;
16701671
const absolutePath = window.location.href.replace(protocolAndPath, '');
1671-
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
1672+
// preserve existing history state as it could be overriden by the user
1673+
const stateCopy = extend({}, window.history.state);
1674+
stateCopy.key = getStateKey();
1675+
window.history.replaceState(stateCopy, '', absolutePath);
16721676
window.addEventListener('popstate', e => {
16731677
saveScrollPosition();
16741678
if (e.state && e.state.key) {
@@ -2857,7 +2861,7 @@ function createHref (base, fullPath, mode) {
28572861
}
28582862

28592863
VueRouter.install = install;
2860-
VueRouter.version = '3.1.5';
2864+
VueRouter.version = '3.1.6';
28612865

28622866
if (inBrowser && window.Vue) {
28632867
window.Vue.use(VueRouter);

Diff for: dist/vue-router.esm.browser.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/vue-router.esm.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.1.5
2+
* vue-router v3.1.6
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -942,7 +942,8 @@ function fillParams (
942942
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
943943

944944
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
945-
if (params.pathMatch) { params[0] = params.pathMatch; }
945+
// and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
946+
if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
946947

947948
return filler(params, { pretty: true })
948949
} catch (e) {
@@ -1690,7 +1691,10 @@ function setupScroll () {
16901691
// location.host contains the port and location.hostname doesn't
16911692
var protocolAndPath = window.location.protocol + '//' + window.location.host;
16921693
var absolutePath = window.location.href.replace(protocolAndPath, '');
1693-
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
1694+
// preserve existing history state as it could be overriden by the user
1695+
var stateCopy = extend({}, window.history.state);
1696+
stateCopy.key = getStateKey();
1697+
window.history.replaceState(stateCopy, '', absolutePath);
16941698
window.addEventListener('popstate', function (e) {
16951699
saveScrollPosition();
16961700
if (e.state && e.state.key) {
@@ -2905,7 +2909,7 @@ function createHref (base, fullPath, mode) {
29052909
}
29062910

29072911
VueRouter.install = install;
2908-
VueRouter.version = '3.1.5';
2912+
VueRouter.version = '3.1.6';
29092913

29102914
if (inBrowser && window.Vue) {
29112915
window.Vue.use(VueRouter);

Diff for: dist/vue-router.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.1.5
2+
* vue-router v3.1.6
33
* (c) 2020 Evan You
44
* @license MIT
55
*/
@@ -948,7 +948,8 @@
948948
(regexpCompileCache[path] = pathToRegexp_1.compile(path));
949949

950950
// Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
951-
if (params.pathMatch) { params[0] = params.pathMatch; }
951+
// and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
952+
if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
952953

953954
return filler(params, { pretty: true })
954955
} catch (e) {
@@ -1696,7 +1697,10 @@
16961697
// location.host contains the port and location.hostname doesn't
16971698
var protocolAndPath = window.location.protocol + '//' + window.location.host;
16981699
var absolutePath = window.location.href.replace(protocolAndPath, '');
1699-
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
1700+
// preserve existing history state as it could be overriden by the user
1701+
var stateCopy = extend({}, window.history.state);
1702+
stateCopy.key = getStateKey();
1703+
window.history.replaceState(stateCopy, '', absolutePath);
17001704
window.addEventListener('popstate', function (e) {
17011705
saveScrollPosition();
17021706
if (e.state && e.state.key) {
@@ -2911,7 +2915,7 @@
29112915
}
29122916

29132917
VueRouter.install = install;
2914-
VueRouter.version = '3.1.5';
2918+
VueRouter.version = '3.1.6';
29152919

29162920
if (inBrowser && window.Vue) {
29172921
window.Vue.use(VueRouter);

Diff for: dist/vue-router.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)