Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game/soldier.js')
-rw-r--r--src/modules/game/soldier.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js
index b01ed15..c4e9753 100644
--- a/src/modules/game/soldier.js
+++ b/src/modules/game/soldier.js
@@ -45,7 +45,7 @@ export function place(svg, selected, cell) {
let points,
counterNodeList = getCounterAndClones(svg, selected);
- if (counterNodeList.length > 0 && selected.parentElement.hasAttribute('data-x')) {
+ if (counterNodeList.length > 0 && svg.querySelector('.grid').contains(selected)) {
let trace = svg.querySelector(traceSelector(selected));
let prevCoords = [