From 0f72340c8d486579b7486e2fdbfa06314c2cb331 Mon Sep 17 00:00:00 2001 From: Veath <627846032@qq.com> Date: Wed, 28 Aug 2019 06:11:05 +0800 Subject: [PATCH] docs: add router err catch (#4266) --- docs/site/utils/iframe-router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/utils/iframe-router.js b/docs/site/utils/iframe-router.js index 29e61a07d..88bc7be42 100644 --- a/docs/site/utils/iframe-router.js +++ b/docs/site/utils/iframe-router.js @@ -34,7 +34,7 @@ export function initIframeRouter() { // should preserve hash for anchor if (window.vueRouter.currentRoute.path !== path) { - window.vueRouter.replace(path); + window.vueRouter.replace(path).catch(() => {}); } }; }