The delete button wasn't working for them with broken links (#1266)

This commit is contained in:
WBHarry 2025-11-11 22:13:37 +01:00 committed by GitHub
parent 7c4200b431
commit 6408528319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) });
}
/**