mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Made sure a non-existant origin doesn't cause ActiveEffect application to break
This commit is contained in:
parent
20056cd950
commit
528985a993
1 changed files with 3 additions and 1 deletions
|
|
@ -185,7 +185,9 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
||||||
if (effect.origin) {
|
if (effect.origin) {
|
||||||
if (useOrigin) value = value.replaceAll(/origin\.@/gi, '@');
|
if (useOrigin) value = value.replaceAll(/origin\.@/gi, '@');
|
||||||
const originEffect = foundry.utils.fromUuidSync(effect.origin);
|
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
|
// Get the actor and item documents. Note that actor roll data is inclusive of system roll data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue