Browse Source

Fix last label undefined

justinr1234 6 năm trước cách đây
mục cha
commit
0cf9a7b552
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;