|
|
@@ -50,7 +50,7 @@ export default {
|
|
50
|
50
|
},
|
|
51
|
51
|
async created() {
|
|
52
|
52
|
// console.log(wp)
|
|
53
|
|
- const omit = ['event', 'exhibition', 'page']
|
|
|
53
|
+ const omit = ['page']
|
|
54
|
54
|
for (let type of postTypes) {
|
|
55
|
55
|
const action = `getAll${convertTitleCase(type)}s`
|
|
56
|
56
|
|
|
|
@@ -60,9 +60,7 @@ export default {
|
|
60
|
60
|
|
|
61
|
61
|
// We try and fetch EVERYTHING except
|
|
62
|
62
|
// for EVENTS and EXHIBITIONS
|
|
63
|
|
- if (!omit.includes(type)) {
|
|
64
|
|
- this.$store.dispatch(action, { sortType: null, params })
|
|
65
|
|
- } else {
|
|
|
63
|
+ if (['event', 'exhibition'].includes(type)) {
|
|
66
|
64
|
// Only grab the current or upcoming on load
|
|
67
|
65
|
const eventsOrExhibitions = await this.$store.dispatch(
|
|
68
|
66
|
action,
|
|
|
@@ -77,6 +75,9 @@ export default {
|
|
77
|
75
|
this.$store.dispatch(action, { sortType: sortTypes.past, params })
|
|
78
|
76
|
}
|
|
79
|
77
|
}
|
|
|
78
|
+ else if (!omit.includes(type)){
|
|
|
79
|
+ this.$store.dispatch(action, { sortType: null, params })
|
|
|
80
|
+ }
|
|
80
|
81
|
}
|
|
81
|
82
|
if (!this['allPagesLoaded']) {
|
|
82
|
83
|
await this.$store.dispatch('getAllPages', { sortType: null, params: null })
|