mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: add router err catch (#4266)
This commit is contained in:
parent
ecbdc2bede
commit
0f72340c8d
@ -34,7 +34,7 @@ export function initIframeRouter() {
|
|||||||
|
|
||||||
// should preserve hash for anchor
|
// should preserve hash for anchor
|
||||||
if (window.vueRouter.currentRoute.path !== path) {
|
if (window.vueRouter.currentRoute.path !== path) {
|
||||||
window.vueRouter.replace(path);
|
window.vueRouter.replace(path).catch(() => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user