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

This commit is contained in:
WBHarry 2026-05-20 17:35:34 +02:00
parent 2f589c1b8e
commit f4adf6c9b2

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);