fix: ensure helminth shard operations don't produce a null shard #2176
@ -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