Browse Source

get all cards sometimes failed because the list was undefined

Martin Filser 3 năm trước cách đây
mục cha
commit
c437c0d3f1
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      client/lib/dialogWithBoardSwimlaneListCard.js

+ 4 - 1
client/lib/dialogWithBoardSwimlaneListCard.js

@@ -23,7 +23,10 @@ export class DialogWithBoardSwimlaneListCard extends DialogWithBoardSwimlaneList
   /** returns all available cards of the current list */
   cards() {
     const list = Lists.findOne(this.selectedListId.get());
-    const ret = list.cards(this.selectedSwimlaneId.get());
+    let ret = {}
+    if (list) {
+      ret = list.cards(this.selectedSwimlaneId.get());
+    }
     return ret;
   }