fix(vue-app): redirect to external url replaces current history entry (#9500)

This commit is contained in:
Mohammad Saleh Fadaei 2021-06-30 22:05:22 +04:30 committed by GitHub
parent eb6bd9febc
commit 0742f59e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,8 +249,8 @@ export async function setContext (app, context) {
}) })
} }
if (process.client) { if (process.client) {
// https://developer.mozilla.org/en-US/docs/Web/API/Location/replace // https://developer.mozilla.org/en-US/docs/Web/API/Location/assign
window.location.replace(path) window.location.assign(path)
// Throw a redirect error // Throw a redirect error
throw new Error('ERR_REDIRECT') throw new Error('ERR_REDIRECT')