Fix deselecting when counter is not on the board
This commit is contained in:
parent
5f17d5d786
commit
bb403234f7
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user