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

View File

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