This commit is contained in:
WBHarry 2025-11-15 16:34:54 +01:00
parent d113ddce74
commit 75510f2797
2 changed files with 8 additions and 5 deletions

View file

@ -2570,6 +2570,7 @@
"evasionMin": "Evasion (Min)", "evasionMin": "Evasion (Min)",
"evasionMax": "Evasion (Max)", "evasionMax": "Evasion (Max)",
"subtype": "Subtype", "subtype": "Subtype",
"missing": "<Missing>",
"folders": { "folders": {
"characters": "Characters", "characters": "Characters",
"adversaries": "Adversaries", "adversaries": "Adversaries",

View file

@ -363,7 +363,7 @@ export const typeConfig = {
{ {
key: 'system.linkedClass', key: 'system.linkedClass',
label: 'Class', label: 'Class',
format: linkedClass => linkedClass.name format: linkedClass => linkedClass?.name ?? game.i18n.localize('DAGGERHEART.UI.ItemBrowser.missing')
}, },
{ {
key: 'system.spellcastingTrait', key: 'system.spellcastingTrait',
@ -375,10 +375,12 @@ export const typeConfig = {
key: 'system.linkedClass.uuid', key: 'system.linkedClass.uuid',
label: 'Class', label: 'Class',
choices: items => { choices: items => {
const list = items.map(item => ({ const list = items
value: item.system.linkedClass.uuid, .filter(item => item.system.linkedClass)
label: item.system.linkedClass.name .map(item => ({
})); value: item.system.linkedClass.uuid,
label: item.system.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);
return a; return a;