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