File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -978,7 +978,7 @@ export function createRouter(options: RouterOptions): Router {
978
978
const shouldRedirect = handleRedirectRecord ( toLocation )
979
979
if ( shouldRedirect ) {
980
980
pushWithRedirect (
981
- assign ( shouldRedirect , { replace : true } ) ,
981
+ assign ( shouldRedirect , { replace : true , force : true } ) ,
982
982
toLocation
983
983
) . catch ( noop )
984
984
return
@@ -1019,7 +1019,9 @@ export function createRouter(options: RouterOptions): Router {
1019
1019
// the error is already handled by router.push we just want to avoid
1020
1020
// logging the error
1021
1021
pushWithRedirect (
1022
- ( error as NavigationRedirectError ) . to ,
1022
+ assign ( locationAsObject ( ( error as NavigationRedirectError ) . to ) , {
1023
+ force : true ,
1024
+ } ) ,
1023
1025
toLocation
1024
1026
// avoid an uncaught rejection, let push call triggerError
1025
1027
)
You can’t perform that action at this time.
0 commit comments