File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ import {
15
15
createNavigationDuplicatedError ,
16
16
createNavigationCancelledError ,
17
17
createNavigationRedirectedError ,
18
- createNavigationAbortedError ,
19
- NavigationFailureType
18
+ createNavigationAbortedError
20
19
} from './errors'
21
20
22
21
export class History {
@@ -114,11 +113,10 @@ export class History {
114
113
confirmTransition ( route : Route , onComplete : Function , onAbort ? : Function ) {
115
114
const current = this . current
116
115
const abort = err => {
117
- // after merging https://github.com/vuejs/vue-router/pull/2771 we
118
- // When the user navigates through history through back/forward buttons
119
- // we do not want to throw the error. We only throw it if directly calling
120
- // push/replace. That's why it's not included in isError
121
- if ( ! isRouterError ( err , NavigationFailureType . duplicated ) && isError ( err ) ) {
116
+ // changed after adding errors with
117
+ // https://github.com/vuejs/vue-router/pull/3047 before that change,
118
+ // redirect and aborted navigation would produce an err == null
119
+ if ( ! isRouterError ( err ) && isError ( err ) ) {
122
120
if ( this . errorCbs . length ) {
123
121
this . errorCbs . forEach ( cb => {
124
122
cb ( err )
You can’t perform that action at this time.
0 commit comments