浏览代码

:recycle: added error msg for unfound type in clearAllPosts

tags/0.9.0
J 4 年前
父节点
当前提交
0b8e9267e6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      vue-theme/src/pages/list.vue

+ 1
- 0
vue-theme/src/pages/list.vue 查看文件

@@ -76,6 +76,7 @@ export default {
76 76
     },
77 77
     methods: {
78 78
         clearAllPosts() {
79
+            if(!this.type) return console.error(`type: ${type}...`)
79 80
             const uppercaseType = this.type.toUpperCase() + 'S'
80 81
             this.$store.commit(`CLEAR_${uppercaseType}`)
81 82
             this.$store.commit(`${uppercaseType}_LOADED`)

正在加载...
取消
保存