From c94d25c1296f27a96df65ddd36e45ec21af9ab6b Mon Sep 17 00:00:00 2001 From: Liana Harris <46411498+LianaHarris360@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:32:39 -0600 Subject: [PATCH] Ensure properties assignment and learner_ids in assignment obj are always arrays --- .../coach/assets/src/modules/classSummary/dataHelpers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kolibri/plugins/coach/assets/src/modules/classSummary/dataHelpers.js b/kolibri/plugins/coach/assets/src/modules/classSummary/dataHelpers.js index b1940aa9292..192392b0399 100644 --- a/kolibri/plugins/coach/assets/src/modules/classSummary/dataHelpers.js +++ b/kolibri/plugins/coach/assets/src/modules/classSummary/dataHelpers.js @@ -90,6 +90,8 @@ export default { if (!assignment) { throw new Error('getLearnersForAssignment: invalid parameter(s)'); } + assignment.assignments = assignment.assignments || []; + assignment.learner_ids = assignment.learner_ids || []; if (!assignment.assignments.length && !assignment.learner_ids.length) { return []; }