diff --git a/index.js b/index.js index abbd678..bef2779 100644 --- a/index.js +++ b/index.js @@ -367,13 +367,13 @@ ${inject.body || ''} }) } - for (let currentFrame = 0; currentFrame < numFrames; ++currentFrame) { + for (let frame = 0; frame < numFrames; ++frame) { const frameOutputPath = isMultiFrame - ? sprintf(tempOutput, currentFrame + 1) + ? sprintf(tempOutput, frame + 1) : tempOutput // eslint-disable-next-line no-undef - await page.evaluate((currentFrame) => animation.goToAndStop(currentFrame, true), currentFrame) + await page.evaluate((frame) => animation.goToAndStop(frame, true), frame) const screenshot = await rootHandle.screenshot({ path: isMp4 ? undefined : frameOutputPath, ...screenshotOpts