From c6cbed0ebf01dbf365920c708e6d0875e2f4f8fc Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Mon, 6 Jul 2020 15:26:43 +0200 Subject: [PATCH] fix corpus bug --- src/components/Content/TocItem.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Content/TocItem.vue b/src/components/Content/TocItem.vue index 892ea14..45b5df7 100644 --- a/src/components/Content/TocItem.vue +++ b/src/components/Content/TocItem.vue @@ -70,11 +70,19 @@ export default { }, isActive () { // console.log('Active', this.$route.params.textid, this.item.uuid) - return this.$route.params.textid === this.item.uuid + if (typeof this.$route.params.textid !== 'undefined') { + return this.$route.params.textid === this.item.uuid + } else { + return false + } }, isOpened () { // console.log('opened', this.$route.params.textid.indexOf(this.item.uuid) >= 0) - return this.$route.params.textid.indexOf(this.item.uuid) >= 0 + if (typeof this.$route.params.textid !== 'undefined') { + return this.$route.params.textid.indexOf(this.item.uuid) >= 0 + } else { + return false + } } }, // beforeCreate () {