summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/cards/deck.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/cards/deck.js b/scripts/cards/deck.js
index 4f7109d..6454a64 100644
--- a/scripts/cards/deck.js
+++ b/scripts/cards/deck.js
@@ -109,7 +109,7 @@ class Deck {
if(index == 0) {
this.prependCard(card);
- } else if (index == this.cards.length) {
+ } else if (index >= this.cards.length) {
this.appendCard(card);
} else {
let temp = this.cards.slice(0, index);