diff --git a/packages/algorithms/src/generate_classes/class.ts b/packages/algorithms/src/generate_classes/class.ts index 07607e83..640ac800 100644 --- a/packages/algorithms/src/generate_classes/class.ts +++ b/packages/algorithms/src/generate_classes/class.ts @@ -45,7 +45,7 @@ export default class Class { typeof attribute === "number" ? attribute : attribute.key(), ) ?? 0, ) - .reduce((acc, cur) => acc + cur); + .reduce((acc, cur) => acc + cur, 0); } /** diff --git a/packages/algorithms/src/generate_classes/rules/rule.ts b/packages/algorithms/src/generate_classes/rules/rule.ts index 82992eac..1d91f43d 100644 --- a/packages/algorithms/src/generate_classes/rules/rule.ts +++ b/packages/algorithms/src/generate_classes/rules/rule.ts @@ -82,7 +82,7 @@ export abstract class Rule { return entry .students() .map((student) => entry.studentValue(student, this).value) - .reduce((acc, cur) => acc + cur); + .reduce((acc, cur) => acc + cur, 0); } /**