Fixed old origin logic

This commit is contained in:
WBHarry 2025-08-07 00:49:58 +02:00
parent df6cea61b2
commit 0b8338d4bc
2 changed files with 5 additions and 5 deletions

View file

@ -75,7 +75,8 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
if (isOriginTarget && change.effect.origin) {
change.value = change.value.replaceAll(/origin\.@/gi, '@');
try {
const doc = foundry.utils.fromUuidSync(change.effect.origin);
const effect = foundry.utils.fromUuidSync(change.effect.origin);
const doc = effect.parent?.parent;
if (doc) parseModel = doc;
} catch (_) {}
}