Selaa lähdekoodia

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
Lauri Ojansivu 3 vuotta sitten
vanhempi
sitoutus
4c659da533
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      client/components/activities/activities.js

+ 3 - 1
client/components/activities/activities.js

@@ -113,8 +113,10 @@ BlazeComponent.extendComponent({
     ).getLabelById(lastLabelId);
     ).getLabelById(lastLabelId);
     if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) {
     if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) {
       return lastLabel.color;
       return lastLabel.color;
-    } else {
+    } else if (lastLabel.name !== undefined && lastLabel.name !== '') {
       return lastLabel.name;
       return lastLabel.name;
+    } else {
+      return null;
     }
     }
   },
   },