Skip to content

Commit f69b2c1

Browse files
committed
chore(release): 3.0.7
1 parent e82fbb0 commit f69b2c1

7 files changed

+49
-37
lines changed

dist/vue-router.common.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.0.6
2+
* vue-router v3.0.7
33
* (c) 2019 Evan You
44
* @license MIT
55
*/
@@ -1389,10 +1389,8 @@ function createMatcher (
13891389
}
13901390
}
13911391

1392-
if (record) {
1393-
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1394-
return _createRoute(record, location, redirectedFrom)
1395-
}
1392+
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1393+
return _createRoute(record, location, redirectedFrom)
13961394
} else if (location.path) {
13971395
location.params = {};
13981396
for (var i = 0; i < pathList.length; i++) {
@@ -1547,7 +1545,12 @@ var positionStore = Object.create(null);
15471545
function setupScroll () {
15481546
// Fix for #1585 for Firefox
15491547
// Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
1550-
window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, ''));
1548+
// Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
1549+
// window.location.protocol + '//' + window.location.host
1550+
// location.host contains the port and location.hostname doesn't
1551+
var protocolAndPath = window.location.protocol + '//' + window.location.host;
1552+
var absolutePath = window.location.href.replace(protocolAndPath, '');
1553+
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
15511554
window.addEventListener('popstate', function (e) {
15521555
saveScrollPosition();
15531556
if (e.state && e.state.key) {
@@ -2119,7 +2122,6 @@ function bindEnterGuard (
21192122
) {
21202123
return function routeEnterGuard (to, from, next) {
21212124
return guard(to, from, function (cb) {
2122-
next(cb);
21232125
if (typeof cb === 'function') {
21242126
cbs.push(function () {
21252127
// #750
@@ -2130,6 +2132,7 @@ function bindEnterGuard (
21302132
poll(cb, match.instances, key, isValid);
21312133
});
21322134
}
2135+
next(cb);
21332136
})
21342137
}
21352138
}
@@ -2664,7 +2667,7 @@ function createHref (base, fullPath, mode) {
26642667
}
26652668

26662669
VueRouter.install = install;
2667-
VueRouter.version = '3.0.6';
2670+
VueRouter.version = '3.0.7';
26682671

26692672
if (inBrowser && window.Vue) {
26702673
window.Vue.use(VueRouter);

dist/vue-router.esm.browser.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.0.6
2+
* vue-router v3.0.7
33
* (c) 2019 Evan You
44
* @license MIT
55
*/
@@ -1364,10 +1364,8 @@ function createMatcher (
13641364
}
13651365
}
13661366

1367-
if (record) {
1368-
location.path = fillParams(record.path, location.params, `named route "${name}"`);
1369-
return _createRoute(record, location, redirectedFrom)
1370-
}
1367+
location.path = fillParams(record.path, location.params, `named route "${name}"`);
1368+
return _createRoute(record, location, redirectedFrom)
13711369
} else if (location.path) {
13721370
location.params = {};
13731371
for (let i = 0; i < pathList.length; i++) {
@@ -1519,7 +1517,12 @@ const positionStore = Object.create(null);
15191517
function setupScroll () {
15201518
// Fix for #1585 for Firefox
15211519
// Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
1522-
window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, ''));
1520+
// Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
1521+
// window.location.protocol + '//' + window.location.host
1522+
// location.host contains the port and location.hostname doesn't
1523+
const protocolAndPath = window.location.protocol + '//' + window.location.host;
1524+
const absolutePath = window.location.href.replace(protocolAndPath, '');
1525+
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
15231526
window.addEventListener('popstate', e => {
15241527
saveScrollPosition();
15251528
if (e.state && e.state.key) {
@@ -2104,7 +2107,6 @@ function bindEnterGuard (
21042107
) {
21052108
return function routeEnterGuard (to, from, next) {
21062109
return guard(to, from, cb => {
2107-
next(cb);
21082110
if (typeof cb === 'function') {
21092111
cbs.push(() => {
21102112
// #750
@@ -2115,6 +2117,7 @@ function bindEnterGuard (
21152117
poll(cb, match.instances, key, isValid);
21162118
});
21172119
}
2120+
next(cb);
21182121
})
21192122
}
21202123
}
@@ -2622,7 +2625,7 @@ function createHref (base, fullPath, mode) {
26222625
}
26232626

26242627
VueRouter.install = install;
2625-
VueRouter.version = '3.0.6';
2628+
VueRouter.version = '3.0.7';
26262629

26272630
if (inBrowser && window.Vue) {
26282631
window.Vue.use(VueRouter);

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.

dist/vue-router.esm.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.0.6
2+
* vue-router v3.0.7
33
* (c) 2019 Evan You
44
* @license MIT
55
*/
@@ -1387,10 +1387,8 @@ function createMatcher (
13871387
}
13881388
}
13891389

1390-
if (record) {
1391-
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1392-
return _createRoute(record, location, redirectedFrom)
1393-
}
1390+
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1391+
return _createRoute(record, location, redirectedFrom)
13941392
} else if (location.path) {
13951393
location.params = {};
13961394
for (var i = 0; i < pathList.length; i++) {
@@ -1545,7 +1543,12 @@ var positionStore = Object.create(null);
15451543
function setupScroll () {
15461544
// Fix for #1585 for Firefox
15471545
// Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
1548-
window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, ''));
1546+
// Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
1547+
// window.location.protocol + '//' + window.location.host
1548+
// location.host contains the port and location.hostname doesn't
1549+
var protocolAndPath = window.location.protocol + '//' + window.location.host;
1550+
var absolutePath = window.location.href.replace(protocolAndPath, '');
1551+
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
15491552
window.addEventListener('popstate', function (e) {
15501553
saveScrollPosition();
15511554
if (e.state && e.state.key) {
@@ -2117,7 +2120,6 @@ function bindEnterGuard (
21172120
) {
21182121
return function routeEnterGuard (to, from, next) {
21192122
return guard(to, from, function (cb) {
2120-
next(cb);
21212123
if (typeof cb === 'function') {
21222124
cbs.push(function () {
21232125
// #750
@@ -2128,6 +2130,7 @@ function bindEnterGuard (
21282130
poll(cb, match.instances, key, isValid);
21292131
});
21302132
}
2133+
next(cb);
21312134
})
21322135
}
21332136
}
@@ -2662,7 +2665,7 @@ function createHref (base, fullPath, mode) {
26622665
}
26632666

26642667
VueRouter.install = install;
2665-
VueRouter.version = '3.0.6';
2668+
VueRouter.version = '3.0.7';
26662669

26672670
if (inBrowser && window.Vue) {
26682671
window.Vue.use(VueRouter);

dist/vue-router.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-router v3.0.6
2+
* vue-router v3.0.7
33
* (c) 2019 Evan You
44
* @license MIT
55
*/
@@ -1393,10 +1393,8 @@ function createMatcher (
13931393
}
13941394
}
13951395

1396-
if (record) {
1397-
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1398-
return _createRoute(record, location, redirectedFrom)
1399-
}
1396+
location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
1397+
return _createRoute(record, location, redirectedFrom)
14001398
} else if (location.path) {
14011399
location.params = {};
14021400
for (var i = 0; i < pathList.length; i++) {
@@ -1551,7 +1549,12 @@ var positionStore = Object.create(null);
15511549
function setupScroll () {
15521550
// Fix for #1585 for Firefox
15531551
// Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
1554-
window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, ''));
1552+
// Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
1553+
// window.location.protocol + '//' + window.location.host
1554+
// location.host contains the port and location.hostname doesn't
1555+
var protocolAndPath = window.location.protocol + '//' + window.location.host;
1556+
var absolutePath = window.location.href.replace(protocolAndPath, '');
1557+
window.history.replaceState({ key: getStateKey() }, '', absolutePath);
15551558
window.addEventListener('popstate', function (e) {
15561559
saveScrollPosition();
15571560
if (e.state && e.state.key) {
@@ -2123,7 +2126,6 @@ function bindEnterGuard (
21232126
) {
21242127
return function routeEnterGuard (to, from, next) {
21252128
return guard(to, from, function (cb) {
2126-
next(cb);
21272129
if (typeof cb === 'function') {
21282130
cbs.push(function () {
21292131
// #750
@@ -2134,6 +2136,7 @@ function bindEnterGuard (
21342136
poll(cb, match.instances, key, isValid);
21352137
});
21362138
}
2139+
next(cb);
21372140
})
21382141
}
21392142
}
@@ -2668,7 +2671,7 @@ function createHref (base, fullPath, mode) {
26682671
}
26692672

26702673
VueRouter.install = install;
2671-
VueRouter.version = '3.0.6';
2674+
VueRouter.version = '3.0.7';
26722675

26732676
if (inBrowser && window.Vue) {
26742677
window.Vue.use(VueRouter);

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.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-router",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"description": "Official router for Vue.js 2",
55
"author": "Evan You",
66
"license": "MIT",

0 commit comments

Comments
 (0)