Parcourir la source

bugfix tocitem

Bachir Soussi Chiadmi il y a 4 ans
Parent
commit
61303fde4d
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      src/components/Content/TocItem.vue

+ 3 - 1
src/components/Content/TocItem.vue

@@ -100,7 +100,9 @@ export default {
   //   console.log('editionid', this.editionid)
   // },
   beforeMount () {
-    this.isOpened = this.$route.params.textid.indexOf(this.item.uuid) >= 0
+    if (typeof this.$route.params.textid !== 'undefined') {
+      this.isOpened = this.$route.params.textid.indexOf(this.item.uuid) >= 0
+    }
   },
   methods: {
     onclick (e) {