From 49471e845eac3ba1e19c182574b23239b83bdf1d Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 12 Oct 2019 16:31:36 +0800 Subject: [PATCH] fix: router err maybe undefined (#4704) --- src/utils/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/router.ts b/src/utils/router.ts index 6bc9e771f..4c1e4d543 100644 --- a/src/utils/router.ts +++ b/src/utils/router.ts @@ -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; } });