Fix root route parsing to exclude base

This commit is contained in:
2020-11-04 20:58:09 -06:00
parent 83b11e267e
commit d1d12663a7
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,8 @@ class Router {
constructor() {
try {
const route = location.href.split(APP_BASE_PATH).filter(Boolean)[0].split(/[#?]/)[0]
if ( route ) {
if ( route && !route.toLowerCase().includes('http://') && !route.toLowerCase().includes('https://') ) {
console.log('resume route', route)
this.navigate(route, {})
}
} catch (e) {}