fix: ensure helminth shard operations don't produce a null shard #2176

Merged
Sainan merged 3 commits from no-null-shards into main 2025-06-17 05:01:56 -07:00
Showing only changes of commit cfa7def9d1 - Show all commits

View File

@ -1073,6 +1073,11 @@ EquipmentSchema.set("toJSON", {
if (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) ?? {});
}
}
});