summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-11-25 09:41:34 -0800
committerMaxime Quandalle <maxime@quandalle.com>2015-11-25 09:46:30 -0800
commitf565aed2596baaf9cd3da63110068177f7461e8e (patch)
tree6cfd70ebf5091925f7e9662029a0ca2135103120 /models/cards.js
parent5763714d22c4533f173d1d34a1210acf548c4d58 (diff)
parentdb90771d9b1330eb8f7183c472545277b8ed9449 (diff)
downloadwekan-f565aed2596baaf9cd3da63110068177f7461e8e.tar.gz
wekan-f565aed2596baaf9cd3da63110068177f7461e8e.tar.bz2
wekan-f565aed2596baaf9cd3da63110068177f7461e8e.zip
Merge GitHub PR #401
I also completed the release notes related to the import feature. Closes #401
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/cards.js b/models/cards.js
index 2e16583d..1895fc69 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -108,7 +108,10 @@ Cards.helpers({
},
cover() {
- return Attachments.findOne(this.coverId);
+ 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;
},
absoluteUrl() {