Просмотр исходного кода

:recycle: just checking for clear

tags/0.9.0
J 4 лет назад
Родитель
Сommit
14a12e6c70
1 измененных файлов: 4 добавлений и 2 удалений
  1. 4
    2
      vue-theme/src/pages/list.vue

+ 4
- 2
vue-theme/src/pages/list.vue Просмотреть файл

@@ -88,14 +88,16 @@ export default {
88 88
             let dispatchParams = { sortType: sort, params }
89 89
             let dispatchAction = `getAll${this.pType}`
90 90
 
91
-            if(clear && this.type && ['event', 'exhibition'].includes(this.type)) {
91
+            let res = null
92
+            if(clear) {
92 93
                 dispatchParams.sortType = sortTypes.currentAndUpcoming
94
+                res = await this.$store.dispatch(dispatchAction, dispatchParams)
93 95
             }
94 96
             // Add to existing except episodes
95 97
             else if (this.type != 'episode') {
96 98
                 dispatchAction = `getMore${this.pType}`
99
+                res = await this.$store.dispatch(dispatchAction, dispatchParams)
97 100
             }
98
-            const res = await this.$store.dispatch(dispatchAction, dispatchParams)
99 101
             
100 102
             console.log('responded:', res)
101 103
             if(!res.length) {

Загрузка…
Отмена
Сохранить