From 8ea22d019210531a686be20978cc2eb4898d7eba Mon Sep 17 00:00:00 2001 From: Hironsan Date: Wed, 22 Jul 2020 15:27:22 +0900 Subject: [PATCH] Fix the header behavior in the error page --- frontend/components/organisms/layout/TheHeader.vue | 2 +- frontend/layouts/default.vue | 1 + frontend/layouts/demo.vue | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/components/organisms/layout/TheHeader.vue b/frontend/components/organisms/layout/TheHeader.vue index e8d002d0..4e6951f1 100644 --- a/frontend/components/organisms/layout/TheHeader.vue +++ b/frontend/components/organisms/layout/TheHeader.vue @@ -118,7 +118,7 @@ export default { ...mapGetters('projects', ['currentProject']), isIndividualProject() { - return this.$route.name.startsWith('projects-id') + return this.$route.name && this.$route.name.startsWith('projects-id') } }, diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index d80da300..4dc95f41 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -11,6 +11,7 @@ import TheFooter from '@/components/organisms/layout/TheFooter' import TheHeader from '@/components/organisms/layout/TheHeader' export default { + middleware: ['check-auth'], components: { TheFooter, TheHeader diff --git a/frontend/layouts/demo.vue b/frontend/layouts/demo.vue index 7c262fbf..683af241 100644 --- a/frontend/layouts/demo.vue +++ b/frontend/layouts/demo.vue @@ -9,6 +9,7 @@ import TheHeader from '~/components/organisms/layout/TheHeader' export default { + middleware: ['check-auth'], components: { TheHeader }