Skip to content

Commit

Permalink
Merge pull request #148 from nypublicradio/mwalsh/WQXR-227
Browse files Browse the repository at this point in the history
WQXR-227 Get images from touts
  • Loading branch information
walsh9 authored Feb 22, 2022
2 parents 0220db6 + db2e703 commit 1e2657b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions addon/components/nypr-brick-item.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Component from "@ember/component";
import { computed } from "@ember/object";
import { equal } from "@ember/object/computed";
import { equal, or } from "@ember/object/computed";
import { htmlSafe } from "@ember/string";
import { get } from "@ember/object";
import layout from "../templates/components/nypr-brick-item";
Expand All @@ -14,8 +14,9 @@ export default Component.extend({

style: computed.reads("backgroundImage"),
vertical: equal("template", "vertical"),
backgroundImage: computed("item.attributes.imageMain.url", function () {
var imageMain = get(this, "item.attributes.imageMain");
imageMain: or("item.attributes.image", "item.attributes.imageMain"),
backgroundImage: computed("imageMain.url", function () {
var imageMain = get(this, "imageMain");
var urlString;

if (imageMain) {
Expand Down

0 comments on commit 1e2657b

Please sign in to comment.