Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game')
-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 1555c19..c5b2323 100644
--- a/src/modules/game/soldier.js
+++ b/src/modules/game/soldier.js
@@ -43,7 +43,7 @@ function updatePlacement(cell, selected, clone) {
selected.dataset.previous = prevCoords;
cell.appendChild(selected);
- selected.childNodes.forEach(n => {
+ Array.from(selected.children).forEach(n => {
if (n.classList.contains('removed')) {
n.remove();
} else if ('preexisting' in n.dataset) {