fix: address code review findings

- Guard against empty awardTypeIds array in AwardRepository
- Refactor Stimulus controller to use data-action attributes instead of
  imperative addEventListener (fixes duplicate listener issue)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thibaud-leclere
2026-04-01 23:10:38 +02:00
parent b637b725d8
commit 51a9f49797
3 changed files with 17 additions and 19 deletions

View File

@@ -75,18 +75,20 @@
<div class="config-hint-types">
<label class="config-checkbox">
<input type="checkbox" name="hint_film" value="1" checked
data-game-config-target="hintType">
data-game-config-target="hintType"
data-action="change->game-config#enforceMinOneChecked">
Film
</label>
<label class="config-checkbox">
<input type="checkbox" name="hint_character" value="1" checked
data-game-config-target="hintType">
data-game-config-target="hintType"
data-action="change->game-config#enforceMinOneChecked">
Rôle
</label>
<label class="config-checkbox">
<input type="checkbox" name="hint_award" value="1" checked
data-game-config-target="hintType"
data-action="change->game-config#toggleAwardSection">
data-action="change->game-config#enforceMinOneChecked">
Récompense
</label>
</div>