Changed ItemLinksField makeup

This commit is contained in:
WBHarry 2025-07-23 14:50:24 +02:00
parent 600c08cb23
commit 30f31e77dd
13 changed files with 120 additions and 96 deletions

View file

@ -20,14 +20,14 @@ export default class DHAncestry extends BaseDataItem {
}
get primaryFeature() {
return this.features.find(
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.primary
return this.features.find(x =>
x.system.itemLinks[CONFIG.DH.ITEM.itemLinkFeatureTypes.primary]?.has(this.parent.uuid)
);
}
get secondaryFeature() {
return this.features.find(
x => x.system.itemLinks[this.parent.uuid] === CONFIG.DH.ITEM.itemLinkFeatureTypes.secondary
return this.features.find(x =>
x.system.itemLinks[CONFIG.DH.ITEM.itemLinkFeatureTypes.secondary]?.has(this.parent.uuid)
);
}
}