chore: don't fail missionInventoryUpdate on unknown items (#2144)
It's possible we started a mission, deleted an item in the webui, and then finished it. The mission completion is still valid, we just can't update that item. Reviewed-on: #2144 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
bdc41de8bb
commit
4823406229
@ -1525,7 +1525,8 @@ export const applyClientEquipmentUpdates = (
|
|||||||
gearArray.forEach(({ ItemId, XP, InfestationDate }) => {
|
gearArray.forEach(({ ItemId, XP, InfestationDate }) => {
|
||||||
const item = category.id(fromOid(ItemId));
|
const item = category.id(fromOid(ItemId));
|
||||||
if (!item) {
|
if (!item) {
|
||||||
throw new Error(`No item with id ${fromOid(ItemId)} in ${categoryName}`);
|
logger.warn(`Skipping unknown ${categoryName} item: id ${fromOid(ItemId)} not found`);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XP) {
|
if (XP) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user