fix user items page crash for item w/o zone data
This commit is contained in:
parent
d219750ea1
commit
3b4d2ac390
1 changed files with 8 additions and 3 deletions
|
@ -383,9 +383,14 @@ const buildItemAllOccupiedZonesLoader = (db) =>
|
|||
|
||||
const entities = rows.map(normalizeRow);
|
||||
|
||||
return itemIds.map((itemId) =>
|
||||
entities.find((e) => e.id === itemId).zoneIds.split(",")
|
||||
);
|
||||
return itemIds.map((itemId) => {
|
||||
const item = entities.find((e) => e.id === itemId);
|
||||
if (!item) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return item.zoneIds.split(",");
|
||||
});
|
||||
});
|
||||
|
||||
const buildItemTradeCountsLoader = (db) =>
|
||||
|
|
Loading…
Reference in a new issue