index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-02 17:33:16 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-02 17:33:16 -0700 |
commit | bb403234f7d748499091e84a5f80d2f1394a4dc3 (patch) | |
tree | 7b60bba9d0152b841f9d12f24f5a3265a86f2d4a /src/modules/gameboard.js | |
parent | 5f17d5d786af74bb7b6bd6f99bcd0ccfab4fc9d5 (diff) |
Fix deselecting when counter is not on the board
Diffstat (limited to 'src/modules/gameboard.js')
-rw-r--r-- | src/modules/gameboard.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index a6b3e22..be725b5 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -171,7 +171,7 @@ function selectOffBoard() { function select(data) { const counter = data && (soldier.getCounter(svg, data) || soldier.createCounter(data)); - const isSelected = counter?.classList.contains(soldier.getSelectedClass()); + const isSelected = data && data.classList && data.classList.contains('selected'); deselect(); |