Fix weapon sheet
This commit is contained in:
@@ -27,4 +27,16 @@ export default class OathHammerClassSheet extends OathHammerItemSheet {
|
||||
)
|
||||
return context
|
||||
}
|
||||
|
||||
/** @override — collect checkbox sets explicitly so unchecking all works */
|
||||
_prepareSubmitData(event, form, formData) {
|
||||
const data = super._prepareSubmitData(event, form, formData)
|
||||
data["system.armorProficiency"] = Array.from(
|
||||
form.querySelectorAll('input[name="system.armorProficiency"]:checked')
|
||||
).map(el => el.value)
|
||||
data["system.weaponProficiency"] = Array.from(
|
||||
form.querySelectorAll('input[name="system.weaponProficiency"]:checked')
|
||||
).map(el => el.value)
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user