Update module/data/action/baseAction.mjs

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
WBHarry 2026-01-16 07:38:01 +01:00 committed by GitHub
parent 14ae1b6e72
commit c5e4dd52cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,7 +273,8 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
* @returns {DhActiveEffect[]}
*/
static async getEffects(actor, effectParent) {
if (actor)
if (!actor) return [];
return Array.from(await actor.allApplicableEffects()).filter(effect => {
/* Effects on weapons only ever apply for the weapon itself */
if (effect.parent.type === 'weapon') {
@ -285,8 +286,6 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
return !effect.isSuppressed;
});
return [];
}
/**