From b3a7a4ac3dfc81600fa1c19bf244d16ede694d87 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Mon, 19 Jul 2021 01:33:58 +0200 Subject: [PATCH] Use new for-loop --- ts/reviewer/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/reviewer/index.ts b/ts/reviewer/index.ts index 2da615e82..f95c97507 100644 --- a/ts/reviewer/index.ts +++ b/ts/reviewer/index.ts @@ -28,13 +28,13 @@ export function getTypedAnswer(): string | null { } function _runHook( - arr: Array + hooks: Array ): Promise>[]> { const promises: (Promise | void)[] = []; - for (let i = 0; i < arr.length; i++) { + for (const hook of hooks) { try { - const result = arr[i](); + const result = hook(); promises.push(result); } catch (error) { console.log("Hook failed: ", error);