fix: thumbnail images now wrok

This commit is contained in:
David Arnold 2020-09-17 00:13:28 -05:00 committed by Denis Perov
parent 2c175f2be6
commit 0e8a02ee2c
2 changed files with 11 additions and 11 deletions

View file

@ -739,12 +739,12 @@ Cards.helpers({
return Attachments.find(
{ 'meta.cardId': this.linkedId },
{ sort: { uploadedAt: -1 } },
);
).each();
} else {
return Attachments.find(
{ 'meta.cardId': this._id },
{ sort: { uploadedAt: -1 } },
);
).each();
}
},
@ -753,7 +753,7 @@ Cards.helpers({
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.path && cover;
return cover && cover.link() && cover;
},
checklists() {