fixed action dialog to save actions. (#72)

This commit is contained in:
IrkTheImp 2025-05-28 06:24:34 -05:00 committed by GitHub
parent c4a03b2d54
commit 00a19d4840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 16 deletions

View file

@ -70,7 +70,9 @@ export default class DaggerheartActionConfig extends DaggerheartSheet(Applicatio
}
static async updateForm(event, _, formData) {
const data = foundry.utils.expandObject(foundry.utils.mergeObject(this.action.toObject(), formData.object));
const data = foundry.utils.expandObject(
foundry.utils.mergeObject(this.action.toObject(), foundry.utils.expandObject(formData.object))
);
const newActions = this.action.parent.actions.map(x => x.toObject());
if (!newActions.findSplice(x => x.id === data.id, data)) {
newActions.push(data);