diff --git a/layouts/Tags.vue b/layouts/Tags.vue index 6994760..83a7d25 100644 --- a/layouts/Tags.vue +++ b/layouts/Tags.vue @@ -41,7 +41,7 @@ export default { created () { if (this.$tags) { - const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list[0].name + const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list.length > 0 ? this.$tags.list[0].name : '' let tags = this.$tags.list tags.map(item => { const color = this._tagColor() diff --git a/package.json b/package.json index 5535705..915c86b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "description": "this is a vuepress theme", "main": "index.js", "scripts": {