Browse Source

get all cards sometimes failed because the list was undefined

Martin Filser 2 years ago
parent
commit
c437c0d3f1
1 changed files with 4 additions and 1 deletions
  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 */
   /** returns all available cards of the current list */
   cards() {
   cards() {
     const list = Lists.findOne(this.selectedListId.get());
     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;
     return ret;
   }
   }