Skip to content

Commit

Permalink
fix: Fix issue with fetching cleric starting equipment options with p…
Browse files Browse the repository at this point in the history
…rerequisites (#329)
  • Loading branch information
SleeplessOne1917 authored Aug 19, 2022
1 parent 33c34f6 commit 3c7fe47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/graphql/resolvers/classResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const resolveEquipmentOption = async option => {
return {
...option,
of: await EquipmentModel.findOne({ index: option.of.index }).lean(),
prerequisites: option.prerequisites?.map(async prereq => ({
...prereq,
proficiency: await ProficiencyModel.findOne({ index: prereq.proficiency.index }).lean(),
})),
};
}

Expand Down

0 comments on commit 3c7fe47

Please sign in to comment.