Skip to content

Commit

Permalink
Fix bug where individual compound requirements do not count toward re…
Browse files Browse the repository at this point in the history
…quirement fulfillment (#567)
  • Loading branch information
willespencer authored Nov 3, 2021
1 parent 228876a commit 0a48828
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Requirements/RequirementHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ export default defineComponent({
requirementFulfilled(): number {
let fulfilled = 0;
this.req.reqs.forEach(req => {
if (req.minCountFulfilled >= req.minCountRequired) fulfilled += 1;
[req, ...Object.values(req.additionalRequirements || {})].forEach(reqOrNestedReq => {
if (reqOrNestedReq.minCountFulfilled >= reqOrNestedReq.minCountRequired) fulfilled += 1;
});
});
return fulfilled;
},
Expand Down

0 comments on commit 0a48828

Please sign in to comment.