From 03c0bb20026eaf3e4479567965b7545628fdd1aa Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 16 Sep 2020 21:18:07 -0500 Subject: [PATCH] fix: cover image - works now --- client/components/cards/minicard.jade | 2 +- models/cards.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 03511e0a5..f4de2584b 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -11,7 +11,7 @@ template(name="minicard") .handle .fa.fa-arrows if cover - .minicard-cover(style="background-image: url('{{cover.url}}');") + .minicard-cover(style="background-image: url('{{cover.link}}');") if labels .minicard-labels each labels diff --git a/models/cards.js b/models/cards.js index 96fa85ca4..949b3402f 100644 --- a/models/cards.js +++ b/models/cards.js @@ -535,10 +535,7 @@ Cards.helpers({ cover() { if (!this.coverId) return false; - const cover = Attachments.findOne(this.coverId); - // if we return a cover before it is fully stored, we will get errors when we try to display it - // todo XXX we could return a default "upload pending" image in the meantime? - return cover && cover.url() && cover; + return Attachments.findOne(this.coverId); }, checklists() {