Fix conflict

This commit is contained in:
Dapoolp 2025-08-05 21:16:13 +02:00
commit 3d1be5fa22
487 changed files with 16301 additions and 1974 deletions

View file

@ -130,7 +130,7 @@ export default function DHApplicationMixin(Base) {
docs.push(doc);
}
docs.filter(doc => doc).map(doc => (doc.apps[this.id] = this));
docs.filter(doc => doc).forEach(doc => (doc.apps[this.id] = this));
if (!!this.options.contextMenus.length) this._createContextMenus();
}

View file

@ -80,10 +80,17 @@ export default class ClassSheet extends DHBaseItemSheet {
'inventory.choiceB'
];
paths.forEach(path => {
const docs = [].concat(foundry.utils.getProperty(this.document, `system.${path}`) ?? []);
docs.forEach(doc => (doc.apps[this.id] = this));
});
for (let path of paths) {
const docDatas = [].concat(foundry.utils.getProperty(this.document, `system.${path}`) ?? []);
const docs = [];
for (var docData of docDatas) {
const doc = await foundry.utils.fromUuid(docData.uuid);
docs.push(doc);
}
docs.filter(doc => doc).forEach(doc => (doc.apps[this.id] = this));
}
}
/**@inheritdoc */