diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-11-12 15:55:07 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-11-12 15:55:07 -0500 |
commit | 5014dd1dfb57bf7921fb9ca53ba036aa6e16beeb (patch) | |
tree | 6f7001fde7a8d963e133234e31d8424dfa0be25a | |
parent | 80bd96ec3de73136783883a488c7ace3d56b48cf (diff) |
Fix swapping just data
-rw-r--r-- | scripts/gui/table.js | 3 |
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); } |