diff --git a/js/src/router/index.ts b/js/src/router/index.ts index 0a8b0534d..9853a7a3e 100644 --- a/js/src/router/index.ts +++ b/js/src/router/index.ts @@ -158,9 +158,11 @@ const router = new Router({ router.beforeEach(authGuardIfNeeded); router.afterEach(() => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - router.app.$children[0].error = null; + if (router.app.$children[0]) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + router.app.$children[0].error = null; + } }); export default router;