diff --git a/src/helpers/randomizeElements.ts b/src/helpers/randomizeElements.ts index 441f355..4c249ec 100644 --- a/src/helpers/randomizeElements.ts +++ b/src/helpers/randomizeElements.ts @@ -2,7 +2,7 @@ export function randomizeElements(arr: T[]): T[] { const result: T[] = [...arr]; for (let i: number = result.length - 1; i > 0; i--) { const j: number = Math.floor(Math.random() * (i + 1)); - [result[i], result[j]] = [result[j], result[i]]; + [result[i]!, result[j]!] = [result[j]!, result[i]!]; } return result.slice(0, 100); } \ No newline at end of file