Explorar o código

Fix last label undefined

justinr1234 %!s(int64=5) %!d(string=hai) anos
pai
achega
0cf9a7b552
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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(
     const lastLabel = Boards.findOne(Session.get('currentBoard')).getLabelById(
       lastLabelId,
       lastLabelId,
     );
     );
-    if (lastLabel.name === undefined || lastLabel.name === '') {
+    if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) {
       return lastLabel.color;
       return lastLabel.color;
     } else {
     } else {
       return lastLabel.name;
       return lastLabel.name;