From 04a2143326dd3eb2a9ebecd45e87edd35230db6c Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sat, 9 May 2020 11:39:14 +0200 Subject: [PATCH] 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. --- src/history/html5.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/history/html5.js b/src/history/html5.js index e1cdba97d..d4a47632e 100644 --- a/src/history/html5.js +++ b/src/history/html5.js @@ -73,7 +73,7 @@ export class HTML5History extends History { export function getLocation (base: string): string { let path = decodeURI(window.location.pathname) - if (base && path.indexOf(base) === 0) { + if (base && path.toLowerCase().indexOf(base.toLowerCase()) === 0) { path = path.slice(base.length) } return (path || '/') + window.location.search + window.location.hash