|
|
@@ -72,11 +72,6 @@ export default {
|
|
72
|
72
|
this.getPosts(false)
|
|
73
|
73
|
},
|
|
74
|
74
|
async getPosts(clear) {
|
|
75
|
|
- // Limit
|
|
76
|
|
- let params = {
|
|
77
|
|
- limit: this.perPage,
|
|
78
|
|
- page: this.page
|
|
79
|
|
- }
|
|
80
|
75
|
// Sorting
|
|
81
|
76
|
let sort = this.sortBy
|
|
82
|
77
|
? this.sortBy
|
|
|
@@ -87,13 +82,17 @@ export default {
|
|
87
|
82
|
|
|
88
|
83
|
let dispatchParams = {
|
|
89
|
84
|
sortType: ['event', 'exhibition'].includes(this.type) ? sortTypes.currentAndUpcoming : sort,
|
|
90
|
|
- params
|
|
|
85
|
+ params: {
|
|
|
86
|
+ limit: this.perPage,
|
|
|
87
|
+ page: this.page
|
|
|
88
|
+ }
|
|
91
|
89
|
}
|
|
|
90
|
+
|
|
92
|
91
|
let dispatchAction = clear ? `getAll${this.pType}` : `getMore${this.pType}`
|
|
93
|
92
|
|
|
94
|
93
|
const res = await this.$store.dispatch(dispatchAction, dispatchParams)
|
|
95
|
94
|
|
|
96
|
|
- if(!res?.length) {
|
|
|
95
|
+ if(res && res.length < 0) {
|
|
97
|
96
|
console.warn('nothing left to get...')
|
|
98
|
97
|
console.log('responded:', res)
|
|
99
|
98
|
}
|