diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-11-12 15:38:09 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-11-12 15:38:09 -0500 |
commit | 80bd96ec3de73136783883a488c7ace3d56b48cf (patch) | |
tree | 7c8b5dac3b121d6fe8951e361f8a243b088e56c2 /scripts | |
parent | bdebfb3d7e4bafe48f7e54a0e9fcf6e6b6b93a6c (diff) |
improve append
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/cards/deck.js | 2 |
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); |