summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-11-12 15:55:07 -0500
committerKyle Gunger <kgunger12@gmail.com>2022-11-12 15:55:07 -0500
commit5014dd1dfb57bf7921fb9ca53ba036aa6e16beeb (patch)
tree6f7001fde7a8d963e133234e31d8424dfa0be25a
parent80bd96ec3de73136783883a488c7ace3d56b48cf (diff)
Fix swapping just data
-rw-r--r--scripts/gui/table.js3
1 files changed, 2 insertions, 1 deletions
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);
}