fix user items page crash for item w/o zone data

This commit is contained in:
Emi Matchu 2020-11-18 10:35:25 -08:00
parent d219750ea1
commit 3b4d2ac390

View file

@ -383,9 +383,14 @@ const buildItemAllOccupiedZonesLoader = (db) =>
const entities = rows.map(normalizeRow); const entities = rows.map(normalizeRow);
return itemIds.map((itemId) => return itemIds.map((itemId) => {
entities.find((e) => e.id === itemId).zoneIds.split(",") const item = entities.find((e) => e.id === itemId);
); if (!item) {
return [];
}
return item.zoneIds.split(",");
});
}); });
const buildItemTradeCountsLoader = (db) => const buildItemTradeCountsLoader = (db) =>