Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WQXR-227 Get images from touts #148

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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