Selaa lähdekoodia

Fix last label undefined

justinr1234 5 vuotta sitten
vanhempi
sitoutus
0cf9a7b552
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      client/components/activities/activities.js

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

@@ -85,7 +85,7 @@ BlazeComponent.extendComponent({
     const lastLabel = Boards.findOne(Session.get('currentBoard')).getLabelById(
       lastLabelId,
     );
-    if (lastLabel.name === undefined || lastLabel.name === '') {
+    if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) {
       return lastLabel.color;
     } else {
       return lastLabel.name;