|
|
@@ -54,7 +54,6 @@ export default {
|
|
54
|
54
|
},
|
|
55
|
55
|
pType() {
|
|
56
|
56
|
if(!this.type) return
|
|
57
|
|
- console.log(this.type, `${convertTitleCase(this.type)}s`)
|
|
58
|
57
|
return this.sortBy ? `${convertTitleCase(this.type.split('/')[0])}s` : `${convertTitleCase(this.type)}s`
|
|
59
|
58
|
},
|
|
60
|
59
|
loaded() {
|
|
|
@@ -119,6 +118,7 @@ export default {
|
|
119
|
118
|
const page = this.allPages.filter(
|
|
120
|
119
|
page => page.slug == type + 's',
|
|
121
|
120
|
)[0]
|
|
|
121
|
+ if(!page) return console.warn(`no page for ${type} found`)
|
|
122
|
122
|
|
|
123
|
123
|
let json = { url: page.featured, heroType:'image' }
|
|
124
|
124
|
if (
|
|
|
@@ -176,10 +176,6 @@ export default {
|
|
176
|
176
|
},
|
|
177
|
177
|
created() {
|
|
178
|
178
|
this.checkAndSetHero(this.type)
|
|
179
|
|
-
|
|
180
|
|
- // We also need to check if only ONE has been loaded because
|
|
181
|
|
- // coming from the homepage there will only be 1 item
|
|
182
|
|
- if (!this[`all${this.pType}Loaded`] || this[`all${this.pType}`].length < 2) this.getPosts(true)
|
|
183
|
179
|
},
|
|
184
|
180
|
}
|
|
185
|
181
|
</script>
|