|
|
@@ -76,7 +76,7 @@ export default {
|
|
76
|
76
|
},
|
|
77
|
77
|
methods: {
|
|
78
|
78
|
clearAllPosts() {
|
|
79
|
|
- if(!this.type) return console.error(`type: ${type}...`)
|
|
|
79
|
+ if(!this.type) return console.error(`type: ${this.type}...`)
|
|
80
|
80
|
const uppercaseType = this.type.toUpperCase() + 'S'
|
|
81
|
81
|
this.$store.commit(`CLEAR_${uppercaseType}`)
|
|
82
|
82
|
this.$store.commit(`${uppercaseType}_LOADED`)
|
|
|
@@ -112,10 +112,11 @@ export default {
|
|
112
|
112
|
async getPosts() {
|
|
113
|
113
|
// Edge case for episodes
|
|
114
|
114
|
await this._getAll('episode', this.$store)
|
|
115
|
|
-
|
|
|
115
|
+
|
|
116
|
116
|
const dispatchAction = `getMore${this.pType}`
|
|
|
117
|
+ const ignore = [`getMoreEpisodes`, 'getMorePages']
|
|
117
|
118
|
let res = null
|
|
118
|
|
- if(this.pType && dispatchAction != `getMoreEpisodes`) {
|
|
|
119
|
+ if(this.pType && !ignore.includes(dispatchAction)) {
|
|
119
|
120
|
res = await this.$store.dispatch(
|
|
120
|
121
|
dispatchAction,
|
|
121
|
122
|
this._getDispatchParams()
|
|
|
@@ -204,6 +205,9 @@ export default {
|
|
204
|
205
|
from.fullPath.includes(this.sortBy) ||
|
|
205
|
206
|
(!to.fullPath.includes(this.sortBy) && !from.fullPath.includes(this.sortBy))
|
|
206
|
207
|
) {
|
|
|
208
|
+ // !: BUG: this causes event and exhibit posts to double(?)
|
|
|
209
|
+ const ignore = ['event', 'exhibition', 'post']
|
|
|
210
|
+ if(ignore.includes(this.type)) return
|
|
207
|
211
|
this.clearAndInitPostList()
|
|
208
|
212
|
}
|
|
209
|
213
|
}
|