From f091c1849a6eb617661670316d5d4fcb1ff1ec08 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Sat, 18 Jul 2026 19:01:13 -0400 Subject: [PATCH] Fix assigning includeBase --- module/data/fields/actionField.mjs | 3 ++- templates/actionTypes/damage.hbs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index ba2fa37e..f2900bf4 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -237,7 +237,8 @@ export function ActionMixin(Base) { await this.parent.updateSource({ [path]: updates }, options); result = this.parent; } else { - result = await this.item.update({ [path]: updates }, options); + // If no changes occur, update returns undefined, but we need to re-retrieve the action anyways + result = (await this.item.update({ [path]: updates }, options)) ?? this.item; } return this.inCollection diff --git a/templates/actionTypes/damage.hbs b/templates/actionTypes/damage.hbs index f8adb628..d430b51f 100644 --- a/templates/actionTypes/damage.hbs +++ b/templates/actionTypes/damage.hbs @@ -12,7 +12,7 @@ {{#if source.main}}
{{#if @root.hasBaseDamage}} - {{formField @root.fields.damage.fields.main.fields.includeBase value=@root.source.damage.includeBase name="damage.main.includeBase" classes="checkbox" localize=true }} + {{formField @root.fields.damage.fields.main.fields.includeBase value=source.main.includeBase name="damage.main.includeBase" classes="checkbox" localize=true }} {{/if}} {{#unless (eq @root.source.type 'healing')}} {{formField baseFields.main.fields.direct value=source.main.direct name=(concat path "damage.main.direct") localize=true classes="checkbox"}}