From 61e04610c084d80c700a93e008b2f216143e2ae5 Mon Sep 17 00:00:00 2001 From: devfake Date: Wed, 24 Jun 2015 17:51:21 +0200 Subject: [PATCH] remove leaders from list --- .../app/modules/deck-builder/components/deck-builder.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/site/client/app/modules/deck-builder/components/deck-builder.js b/site/client/app/modules/deck-builder/components/deck-builder.js index 66f116b..fa2244b 100644 --- a/site/client/app/modules/deck-builder/components/deck-builder.js +++ b/site/client/app/modules/deck-builder/components/deck-builder.js @@ -18,7 +18,12 @@ module.exports = { }, ready: function() { - this.cards = cards; + // filter over leaders and store them separately. + this.cards = $.map(cards, (n) => { + if(n.type != 3) return n; + + this.leaders.push(n); + }); }, methods: { @@ -30,7 +35,7 @@ module.exports = { setTimeout(function() { $('.all-cards').removeClass('remove'); - }, 600); + }, 500); } } }; \ No newline at end of file