mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
docs: add router err catch (#4266)
This commit is contained in:
@@ -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(() => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user