Web Dev Solutions

Catalin Mititiuc

From ddd32d47c5210eeda6209c6caa36a426a668cc21 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 2 May 2024 16:58:00 -0700 Subject: Generate weapon data dynamically from counters --- src/modules/game/soldier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/game/soldier.js') 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) { -- cgit v1.2.3