From 5014dd1dfb57bf7921fb9ca53ba036aa6e16beeb Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 12 Nov 2022 15:55:07 -0500 Subject: Fix swapping just data --- scripts/gui/table.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/gui/table.js b/scripts/gui/table.js index ea7254d..01726e2 100644 --- a/scripts/gui/table.js +++ b/scripts/gui/table.js @@ -146,7 +146,8 @@ class Table{ return false; } this.cards[data.id] = this.cards[data.card]; - delete this.cards[data.card]; + if (data.card != data.id) + delete this.cards[data.card]; this.cards[data.id].id = data.id; this.cards[data.id].generateElements(data.data); } -- cgit v1.2.3