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,11 +443,13 @@ 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);
if (linkedClass) {
list.push({ list.push({
value: linkedClass.uuid, value: linkedClass.uuid,
label: linkedClass.name label: linkedClass.name
}); });
} }
}
return list.reduce((a, c) => { return list.reduce((a, c) => {
if (!a.find(i => i.value === c.value)) a.push(c); if (!a.find(i => i.value === c.value)) a.push(c);