diff options
Diffstat (limited to 'resources/js/main.js')
-rw-r--r-- | resources/js/main.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/js/main.js b/resources/js/main.js index 6ea94e2..aa86423 100644 --- a/resources/js/main.js +++ b/resources/js/main.js @@ -1,4 +1,4 @@ -(async function () { +UI.createEventListener(async function () { await initializeDB(); // Start Game @@ -7,7 +7,7 @@ const monsterSelection = UI.openStarterMonsterSelection( await Promise.all(possibleStarterMonsters.map(async (monsterSlug) => await fetchMonster(monsterSlug))) ); - monsterSelection.addEventListener('starter:monster:selected', async (event) => { + monsterSelection.addEventListener('starter:monster:selected', UI.createEventListener(async (event) => { if (!confirm(`Select ${event.detail.monster.name}?`)) { return; } @@ -35,5 +35,5 @@ UI.drawActiveTechniques(); event.detail.popup.remove(); - }); + })); })(); |