Skip to content

Commit 0f72340

Browse files
Veathchenjiahan
authored andcommitted
docs: add router err catch (youzan#4266)
1 parent ecbdc2b commit 0f72340

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/site/utils/iframe-router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function initIframeRouter() {
3434

3535
// should preserve hash for anchor
3636
if (window.vueRouter.currentRoute.path !== path) {
37-
window.vueRouter.replace(path);
37+
window.vueRouter.replace(path).catch(() => {});
3838
}
3939
};
4040
}

0 commit comments

Comments
 (0)