From 0a4882864056e091c471dd7925ae26aed402ca21 Mon Sep 17 00:00:00 2001 From: Will Spencer Date: Tue, 2 Nov 2021 22:12:13 -0400 Subject: [PATCH] Fix bug where individual compound requirements do not count toward requirement fulfillment (#567) --- src/components/Requirements/RequirementHeader.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Requirements/RequirementHeader.vue b/src/components/Requirements/RequirementHeader.vue index 272c0fe98..8319c35b2 100644 --- a/src/components/Requirements/RequirementHeader.vue +++ b/src/components/Requirements/RequirementHeader.vue @@ -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; },