The delete button wasn't working for them with broken links

This commit is contained in:
WBHarry 2025-11-11 21:28:35 +01:00
parent 84ef1063d8
commit 8ccd9eb076
2 changed files with 3 additions and 3 deletions

View file

@ -203,10 +203,10 @@ export default class ClassSheet extends DHBaseItemSheet {
if (target === 'subclasses') {
const subclass = await foundry.utils.fromUuid(uuid);
await subclass.update({ 'system.linkedClass': null });
await subclass?.update({ 'system.linkedClass': null });
}
await this.document.update({ [`system.${target}`]: prop.filter(i => i.uuid !== uuid).map(x => x.uuid) });
await this.document.update({ [`system.${target}`]: prop.filter(i => i && i.uuid !== uuid).map(x => x.uuid) });
}
/**