Explorar el Código

:recycle: just checking for clear

tags/0.9.0
J hace 4 años
padre
commit
14a12e6c70
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4
    2
      vue-theme/src/pages/list.vue

+ 4
- 2
vue-theme/src/pages/list.vue Ver fichero

88
             let dispatchParams = { sortType: sort, params }
88
             let dispatchParams = { sortType: sort, params }
89
             let dispatchAction = `getAll${this.pType}`
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
                 dispatchParams.sortType = sortTypes.currentAndUpcoming
93
                 dispatchParams.sortType = sortTypes.currentAndUpcoming
94
+                res = await this.$store.dispatch(dispatchAction, dispatchParams)
93
             }
95
             }
94
             // Add to existing except episodes
96
             // Add to existing except episodes
95
             else if (this.type != 'episode') {
97
             else if (this.type != 'episode') {
96
                 dispatchAction = `getMore${this.pType}`
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
             console.log('responded:', res)
102
             console.log('responded:', res)
101
             if(!res.length) {
103
             if(!res.length) {

Loading…
Cancelar
Guardar