summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md25
-rw-r--r--client/components/activities/activities.js7
-rw-r--r--client/components/cards/cardDetails.js9
-rw-r--r--models/cards.js1
4 files changed, 38 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f1db307a..1c9f2aa3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,28 @@
+# Upcoming Wekan release
+
+This release fixes the following updates:
+
+- [Update packages](https://github.com/wekan/wekan/commit/3b44acd87c35340bf9fe5d210f4402f1b1a1dfdf).
+ Thanks to xet7.
+
+and fixes the following bugs:
+
+- Try to fix Snap [1](https://github.com/wekan/wekan/commit/6fad68b9b9afd8de7074037d73eeac40f6a3f7c1), [2](https://github.com/wekan/wekan/commit/b737adfcdfc9b8084a7eb84420a89c014bbec1fb).
+ Thanks to xet7.
+- [Add default attachments store path /var/snap/wekan/common/uploads where attachments will be
+ stored](https://github.com/wekan/wekan/commit/c61a126c8bcb25a1eda0203b89c990ae31de7a70).
+ Thanks to xet7.
+- [Make scrollParentContainer() more robust as it's used in a timeout callback. Example exception: Exception in setTimeout callback: TypeError: Cannot read property 'parentComponent' of null. Probably there is a better fix for this](https://github.com/wekan/wekan/commit/d5fbd50b760b1d3b84b5b4e8af3a8ed7608e2918).
+ Thanks to marc1006.
+- [Fix error link not available. Fixes: Exception in template helper: TypeError: Cannot read property 'link' of
+undefined](https://github.com/wekan/wekan/commit/b7105d7b5712dcdbf9dadebfddaba7691810da5c).
+ Thanks to marc1006.
+- [Fix minicard cover functionality. Otherwise, if `this.coverId` is undefined then `Attachments.findOne()` would return any
+attachment](https://github.com/wekan/wekan/commit/66d35a15280795b76a81c3e59cebbd2a29e4dff8).
+ Thanks to marc1006.
+
+Thanks to above GitHub users for their contributions and translators for their translations.
+
# v4.04 2020-05-24 Wekan release
This release adds the following features:
diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js
index 186200ec..4f15d421 100644
--- a/client/components/activities/activities.js
+++ b/client/components/activities/activities.js
@@ -151,8 +151,9 @@ BlazeComponent.extendComponent({
},
attachmentLink() {
- const attachment = this.currentData().activity.attachment();
- const link = attachment.link('original', '/');
+ const activity = this.currentData().activity;
+ const attachment = activity.attachment();
+ const link = attachment ? attachment.link('original', '/') : null;
// trying to display url before file is stored generates js errors
return (
(attachment &&
@@ -166,7 +167,7 @@ BlazeComponent.extendComponent({
attachment.name,
),
)) ||
- this.currentData().activity.attachmentName
+ activity.attachmentName
);
},
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index a57eddf9..d877421c 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -74,11 +74,18 @@ BlazeComponent.extendComponent({
scrollParentContainer() {
const cardPanelWidth = 510;
- const bodyBoardComponent = this.parentComponent().parentComponent();
+ const parentComponent = this.parentComponent();
+ // TODO sometimes parentComponent is not available, maybe because it's not
+ // yet created?!
+ if (!parentComponent) return;
+ const bodyBoardComponent = parentComponent.parentComponent();
//On Mobile View Parent is Board, Not Board Body. I cant see how this funciton should work then.
if (bodyBoardComponent === null) return;
const $cardView = this.$(this.firstNode());
const $cardContainer = bodyBoardComponent.$('.js-swimlanes');
+ // TODO sometimes cardContainer is not available, maybe because it's not yet
+ // created?!
+ if (!$cardContainer) return;
const cardContainerScroll = $cardContainer.scrollLeft();
const cardContainerWidth = $cardContainer.width();
diff --git a/models/cards.js b/models/cards.js
index f4bb464c..757772f3 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -535,6 +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?