|
|
@@ -115,9 +115,9 @@ export default {
|
|
115
|
115
|
async getPosts() {
|
|
116
|
116
|
// Edge case for episodes
|
|
117
|
117
|
await this._getAll('episode', this.$store)
|
|
|
118
|
+ const ignore = [`getMoreEpisodes`, 'getMorePages']
|
|
118
|
119
|
|
|
119
|
120
|
const dispatchAction = `getMore${this.pType}`
|
|
120
|
|
- const ignore = [`getMoreEpisodes`, 'getMorePages']
|
|
121
|
121
|
let res = null
|
|
122
|
122
|
if(this.pType && !ignore.includes(dispatchAction)) {
|
|
123
|
123
|
res = await this.$store.dispatch(
|
|
|
@@ -145,7 +145,7 @@ export default {
|
|
145
|
145
|
// with how to render based on hero.url
|
|
146
|
146
|
if(!this.allPages) return console.warn('no pages in state', this)
|
|
147
|
147
|
const page = this.allPages.filter(
|
|
148
|
|
- page => page.slug == type + 's',
|
|
|
148
|
+ page => page.slug == `${type}s`,
|
|
149
|
149
|
)[0]
|
|
150
|
150
|
if(!page) return console.warn(`no page for ${type} found`)
|
|
151
|
151
|
|
|
|
@@ -203,12 +203,11 @@ export default {
|
|
203
|
203
|
// Check if we changed sort method
|
|
204
|
204
|
// from no sort to sorted
|
|
205
|
205
|
// or sorted to no sort
|
|
206
|
|
- // or sort to a different sort(?))
|
|
|
206
|
+ // or sort to a different sort(?)
|
|
207
|
207
|
if(
|
|
208
|
208
|
from.fullPath.includes(this.sortBy) ||
|
|
209
|
209
|
(!to.fullPath.includes(this.sortBy) && !from.fullPath.includes(this.sortBy))
|
|
210
|
210
|
) {
|
|
211
|
|
- // !: BUG: this causes event and exhibit posts to double(?)
|
|
212
|
211
|
const ignore = ['event', 'exhibition', 'post', 'artist']
|
|
213
|
212
|
if(ignore.includes(this.type)) return
|
|
214
|
213
|
this.clearAndInitPostList()
|