From 80bd96ec3de73136783883a488c7ace3d56b48cf Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 12 Nov 2022 15:38:09 -0500 Subject: improve append --- scripts/cards/deck.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cards') 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); -- cgit v1.2.3