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);