Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
image discrepancy - favor lead_asset over listing_image in the CMS
  • Loading branch information
kimlarocca committed Aug 6, 2021
1 parent 25fe3c9 commit 1063587
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mixins/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export const formatTags = function (name, slug, sponsored, tags) {
// slug = the article's ancestry's slug 'ancestry[0].slug' from the CMS API
// listingImage = the article's 'listing_image' from the CMS API
export const getArticleImage = function (asset, slug, listingImage) {
if (listingImage !== undefined && listingImage !== null) {
return `${this.$config.imageBase}${listingImage.id}/fill-560x413/`
}
if (asset !== undefined && asset.length > 0) {
if (asset[0].value.image) {
return `${this.$config.imageBase}${asset[0].value.image.id}/fill-560x413/`
Expand All @@ -38,6 +35,9 @@ export const getArticleImage = function (asset, slug, listingImage) {
return `${this.$config.imageBase}${asset[0].value.defaultImage.id}/fill-560x413/`
}
}
if (listingImage !== undefined && listingImage !== null) {
return `${this.$config.imageBase}${listingImage.id}/fill-560x413/`
}
switch (slug) {
case 'arts-entertainment':
return this.defaultImageArts
Expand Down

0 comments on commit 1063587

Please sign in to comment.