Pārlūkot izejas kodu

:recycle: added error msg for unfound type in clearAllPosts

tags/0.9.0
J 4 gadus atpakaļ
vecāks
revīzija
0b8e9267e6
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1
    0
      vue-theme/src/pages/list.vue

+ 1
- 0
vue-theme/src/pages/list.vue Parādīt failu

@@ -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`)

Notiek ielāde…
Atcelt
Saglabāt