Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-04-24 15:08:07 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-04-24 15:08:07 -0700
commitbdeddc71eb64c60e8a6db64cb401b6e3a5f5571a (patch)
tree9ad95a43de060bfef36e12e1c8f357777c79583d /src/index.js
parent525ab3423728a0485c6b64cca00eed59990ddcfc (diff)
Remove references to 'container' in counter.js; fix dblclick not working right
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index 89893b6..b4216be 100644
--- a/src/index.js
+++ b/src/index.js
@@ -121,7 +121,8 @@ window.addEventListener('load', () => {
game.unSelect();
RecordSheet.unSelect();
} else {
- game.select(el.dataset.troopAllegiance, el.dataset.troopNumber);
+ const { troopAllegiance: allegiance, troopNumber: number } = el.dataset;
+ game.select({ dataset: { allegiance, number }});
}
})
);
@@ -156,7 +157,8 @@ window.addEventListener('load', () => {
.forEach(el => el.classList.remove('movement-ended'));
game.endTurn(allegiance);
- game.select(records.at(0).dataset.troopAllegiance, records.at(0).dataset.troopNumber);
+ const { troopAllegiance, troopNumber } = records.at(0).dataset;
+ game.select({ dataset: { allegiance: troopAllegiance, number: troopNumber }});
})
);