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