Skip to content

Commit 625df23

Browse files
committed
[build] 2.0.0-beta.4
1 parent 2a89fad commit 625df23

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

dist/vue-router.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@
11771177
var this$1 = this;
11781178

11791179
this.router = router
1180-
this.base = normalizeBae(base)
1180+
this.base = normalizeBase(base)
11811181
// start with a route object that stands for "nowhere"
11821182
this.current = createRoute(null, {
11831183
path: '__vue_router_init__'
@@ -1247,11 +1247,7 @@
12471247
})
12481248
};
12491249

1250-
History.prototype.getLocation = function getLocation () {
1251-
return '/'
1252-
};
1253-
1254-
function normalizeBae (base ) {
1250+
function normalizeBase (base ) {
12551251
if (!base) {
12561252
if (inBrowser) {
12571253
// respect <base> tag
@@ -1480,7 +1476,7 @@
14801476
if (base && path.indexOf(base) === 0) {
14811477
path = path.slice(base.length)
14821478
}
1483-
return path + window.location.search + window.location.hash
1479+
return (path || '/') + window.location.search + window.location.hash
14841480
}
14851481

14861482
function pushState (url , replace ) {
@@ -1513,6 +1509,7 @@
15131509
if (fallback && this.checkFallback()) {
15141510
return
15151511
}
1512+
ensureSlash()
15161513
window.addEventListener('hashchange', function () {
15171514
this$1.onHashChange()
15181515
})
@@ -1523,7 +1520,6 @@
15231520
HashHistory.prototype.constructor = HashHistory;
15241521

15251522
HashHistory.prototype.onInit = function onInit () {
1526-
ensureSlash()
15271523
// possible redirect on start
15281524
if (getHash() !== this.current.fullPath) {
15291525
replaceHash(this.current.fullPath)

0 commit comments

Comments
 (0)