fix: error when using consumable item in mission (#165)

This commit is contained in:
Sainan 2024-05-06 15:07:36 +02:00 committed by GitHub
parent 1dd9f4ca4f
commit 91abd419f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,7 +319,9 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques
addConsumables(inventory, Consumables); addConsumables(inventory, Consumables);
addRecipes(inventory, Recipes); addRecipes(inventory, Recipes);
addChallenges(inventory, ChallengeProgress); addChallenges(inventory, ChallengeProgress);
addMissionComplete(inventory, Missions!); if (Missions) {
addMissionComplete(inventory, Missions);
}
const changedInventory = await inventory.save(); const changedInventory = await inventory.save();
return changedInventory.toJSON(); return changedInventory.toJSON();