Fix handling of broken items on startup
This commit is contained in:
parent
d0cac2263e
commit
6f14b5f45d
1 changed files with 8 additions and 4 deletions
|
@ -426,11 +426,15 @@ async function getAllItems(): Promise<AllItemsType> {
|
||||||
|
|
||||||
const keys = ITEM_SPECS[key];
|
const keys = ITEM_SPECS[key];
|
||||||
|
|
||||||
const deserializedValue = keys
|
try {
|
||||||
? (specToBytes(keys, { value }) as ItemType<typeof key>).value
|
const deserializedValue = keys
|
||||||
: value;
|
? (specToBytes(keys, { value }) as ItemType<typeof key>).value
|
||||||
|
: value;
|
||||||
|
|
||||||
result[key] = deserializedValue;
|
result[key] = deserializedValue;
|
||||||
|
} catch (error) {
|
||||||
|
log.warn(`getAllItems(${id}): Failed to parse item from spec`, error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue