diff --git a/js/src/router/index.ts b/js/src/router/index.ts index b9ed1ca1..bb10b78d 100644 --- a/js/src/router/index.ts +++ b/js/src/router/index.ts @@ -205,3 +205,12 @@ router.beforeEach(authGuardIfNeeded); // console.error(e); // } // }); + +router.onError((error, to) => { + if ( + error.message.includes("Failed to fetch dynamically imported module") || + error.message.includes("Importing a module script failed") + ) { + window.location.href = to.fullPath; + } +});