fix: error when using consumable item in mission #165

Merged
Sainan merged 1 commits from fix-gear into main 2024-05-06 06:07:36 -07:00

View File

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