Skip to content

Commit 04a2143

Browse files
committed
fix(html5): make base case insensitive
Fix #2154 This is mostly convenience so it's always made case insensitive. If there are any case sensitive requirements, the test should be made server side.
1 parent 11e779a commit 04a2143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/history/html5.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class HTML5History extends History {
7373

7474
export function getLocation (base: string): string {
7575
let path = decodeURI(window.location.pathname)
76-
if (base && path.indexOf(base) === 0) {
76+
if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) {
7777
path = path.slice(base.length)
7878
}
7979
return (path || '/') + window.location.search + window.location.hash

0 commit comments

Comments
 (0)