Skip to content

Commit 2f02bf5

Browse files
committed
Revert "strip origin when normalizing base (#1448)"
This reverts commit 39393e4.
1 parent 05a5f08 commit 2f02bf5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/history/base.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,11 @@ export class History {
188188
}
189189

190190
function normalizeBase (base: ?string): string {
191-
// respect <base> tag
192191
if (!base) {
193192
if (inBrowser) {
194193
// respect <base> tag
195-
const baseURI = document.baseURI || '/'
196-
const a = document.createElement('a')
197-
a.href = baseURI
198-
base = a.pathname
194+
const baseEl = document.querySelector('base')
195+
base = (baseEl && baseEl.getAttribute('href')) || '/'
199196
} else {
200197
base = '/'
201198
}

0 commit comments

Comments
 (0)