From 0b02e88ee36ea75ccdab940c76c14ea0ff70d758 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 21 Sep 2021 22:46:32 +0300 Subject: [PATCH] Try to fix Bug: Card number equal to #0 when creating a sub-task from a card. Thanks to marcungeschikts, olivierlambert and xet7 ! Fixes #3970 --- client/components/activities/activities.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index 8ab092ea2..f8025d659 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -113,8 +113,10 @@ BlazeComponent.extendComponent({ ).getLabelById(lastLabelId); if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) { return lastLabel.color; - } else { + } else if (lastLabel.name !== undefined && lastLabel.name !== '') { return lastLabel.name; + } else { + return null; } },