Parcourir la source

get all cards sometimes failed because the list was undefined

Martin Filser il y a 3 ans
Parent
commit
c437c0d3f1
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  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;
   }