From 528985a9935cb30b28d7c1fb88570e576dd7cac4 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 1 May 2026 11:30:41 +0200 Subject: [PATCH] Made sure a non-existant origin doesn't cause ActiveEffect application to break --- module/documents/activeEffect.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 08463818..9962e39a 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -185,7 +185,9 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { if (effect.origin) { if (useOrigin) value = value.replaceAll(/origin\.@/gi, '@'); const originEffect = foundry.utils.fromUuidSync(effect.origin); - origin = this.#resolveParentDocument(originEffect, Item); + + if (originEffect) + origin = this.#resolveParentDocument(originEffect, Item); } // Get the actor and item documents. Note that actor roll data is inclusive of system roll data