Petites améliorations

This commit is contained in:
2025-10-05 22:36:41 +02:00
parent 33dc58138c
commit 1bf9e330f4
18 changed files with 79 additions and 42 deletions

View File

@@ -27,7 +27,7 @@ export class RollPartSelect extends RollPart {
const current = this.getCurrent(rollData)
const newChoice = (choices.length == 0)
? { key: '', value: defValue }
: this.$getSelectedChoice(choices, key ?? current?.key ?? refs?.key ?? '')
: this.$getSelectedChoice(choices, key ?? current?.key ?? refs?.key ?? choices[0].key)
this.setCurrent(rollData, newChoice)
return newChoice
}