Skip to content

Commit

Permalink
Fixed double allocating on multiple calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-sth committed Oct 18, 2023
1 parent f12b716 commit 41ef46d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions alg/TimeDistribution/AllocateGroupsToItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function allocateGroupsToItems(
items: Item[],
groups: Group[]
): void {
items.forEach((item) => (item.studentIds = []));
paths.forEach((path) => {
if (path.valueForDistributingOfStudents !== 0) {
const groupId = path.groupId;
Expand Down

0 comments on commit 41ef46d

Please sign in to comment.