From 69607d2c8f88d755a6e4dd80b8e34b20a4ac34d8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 8 Feb 2021 10:40:09 +0100 Subject: [PATCH] Fix Vue vm children not found Signed-off-by: Thomas Citharel --- js/src/router/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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;