Explorar o código

fix corpus bug

Bachir Soussi Chiadmi %!s(int64=3) %!d(string=hai) anos
pai
achega
c6cbed0ebf
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      src/components/Content/TocItem.vue

+ 10 - 2
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 () {