Fixed so that a non-existing class link uuid on a subclass doesn't make the subclass filter error (#1910)

This commit is contained in:
WBHarry 2026-05-20 21:43:11 +02:00 committed by GitHub
parent b23095cb2f
commit b145f515d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -443,10 +443,12 @@ export const typeConfig = {
const list = []; const list = [];
for (const item of items.filter(item => item.system.linkedClass)) { for (const item of items.filter(item => item.system.linkedClass)) {
const linkedClass = await foundry.utils.fromUuid(item.system.linkedClass); const linkedClass = await foundry.utils.fromUuid(item.system.linkedClass);
list.push({ if (linkedClass) {
value: linkedClass.uuid, list.push({
label: linkedClass.name value: linkedClass.uuid,
}); label: linkedClass.name
});
}
} }
return list.reduce((a, c) => { return list.reduce((a, c) => {