IE compatibility and add unit tests
This commit is contained in:
parent
31654f12ec
commit
ca8ae50717
3 changed files with 95 additions and 3 deletions
|
|
@ -74,11 +74,11 @@ export class History {
|
|||
if (local) {
|
||||
const idIndex = currentRoute.indexOf('?')
|
||||
path =
|
||||
(idIndex > 0 ? currentRoute.substr(0, idIndex) : currentRoute) + path
|
||||
(idIndex > 0 ? currentRoute.substring(0, idIndex) : currentRoute) + path
|
||||
}
|
||||
|
||||
if (this.config.relativePath && !path.startsWith('/')) {
|
||||
const currentDir = currentRoute.substr(0, currentRoute.lastIndexOf('/') + 1)
|
||||
if (this.config.relativePath && path.indexOf('/') !== 0) {
|
||||
const currentDir = currentRoute.substring(0, currentRoute.lastIndexOf('/') + 1)
|
||||
return cleanPath(resolvePath(currentDir + path))
|
||||
}
|
||||
return cleanPath('/' + path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue