浏览代码

bugfix tocitem

Bachir Soussi Chiadmi 4 年之前
父节点
当前提交
61303fde4d
共有 1 个文件被更改,包括 3 次插入1 次删除
  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) {