Skip to content

Commit

Permalink
Ensure properties assignment and learner_ids in assignment obj are al…
Browse files Browse the repository at this point in the history
…ways arrays
  • Loading branch information
LianaHarris360 committed Dec 12, 2024
1 parent de63959 commit c94d25c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}
Expand Down

0 comments on commit c94d25c

Please sign in to comment.