fix null in inventory response
This commit is contained in:
parent
a1e56df519
commit
cfa7def9d1
@ -1073,6 +1073,11 @@ EquipmentSchema.set("toJSON", {
|
|||||||
if (db.UmbraDate) {
|
if (db.UmbraDate) {
|
||||||
client.UmbraDate = toMongoDate(db.UmbraDate);
|
client.UmbraDate = toMongoDate(db.UmbraDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client.ArchonCrystalUpgrades) {
|
||||||
|
// For some reason, mongoose turns empty objects here into nulls, so we have to fix it.
|
||||||
|
client.ArchonCrystalUpgrades = client.ArchonCrystalUpgrades.map(x => (x as unknown) ?? {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user