fix: randStudent mainTeacher max randNumber

This commit is contained in:
marryday
2023-09-30 03:54:43 +04:00
parent d306a6f681
commit b4c43a2f1e

View File

@@ -36,7 +36,7 @@ export const randStudent = (): Student => ({
id: factoryStudent(),
firstname: randFirstName(),
lastname: randLastName(),
mainTeacher: teachers[randNumber({ max: teachers.length })],
mainTeacher: teachers[randNumber({ max: teachers.length - 1 })],
school: randWord(),
});