fix(vue-app): duplicated router.base when using context.redirect(object) (#5290)

This commit is contained in:
Nianyong 2019-03-20 20:09:14 +08:00 committed by Pooya Parsa
parent 0eb5ed9763
commit cf02e8226a

View File

@ -164,7 +164,7 @@ export async function setContext(app, context) {
status = 302 status = 302
} }
if (pathType === 'object') { if (pathType === 'object') {
path = app.router.resolve(path).href path = app.router.resolve(path).route.fullPath
} }
// "/absolute/route", "./relative/route" or "../relative/route" // "/absolute/route", "./relative/route" or "../relative/route"
if (/(^[.]{1,2}\/)|(^\/(?!\/))/.test(path)) { if (/(^[.]{1,2}\/)|(^\/(?!\/))/.test(path)) {