fix: router err maybe undefined (#4704)

This commit is contained in:
neverland 2019-10-12 16:31:36 +08:00 committed by GitHub
parent 4ea506c559
commit 49471e845e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ export function route(router: VueRouter, config: RouteConfig) {
if (promise && promise.catch) { if (promise && promise.catch) {
promise.catch(err => { promise.catch(err => {
/* istanbul ignore if */ /* istanbul ignore if */
if (err.name !== 'NavigationDuplicated') { if (err && err.name !== 'NavigationDuplicated') {
throw err; throw err;
} }
}); });