From 8d5433c8e373862a0ab8e7ad01d6be6d72d07748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Tue, 24 Mar 2020 13:08:53 -0300 Subject: [PATCH] fix(screenshotter) validateScreeshotOptions typo (#1509) There is a type in the function name --- src/screenshotter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screenshotter.ts b/src/screenshotter.ts index 488e39cb773ae..ed8a3bd1eacad 100644 --- a/src/screenshotter.ts +++ b/src/screenshotter.ts @@ -79,7 +79,7 @@ export class Screenshotter { } async screenshotPage(options: types.ScreenshotOptions = {}): Promise { - const format = validateScreeshotOptions(options); + const format = validateScreenshotOptions(options); return this._queue.postTask(async () => { const { viewportSize, originalViewportSize } = await this._originalViewportSize(); @@ -103,7 +103,7 @@ export class Screenshotter { } async screenshotElement(handle: dom.ElementHandle, options: types.ElementScreenshotOptions = {}): Promise { - const format = validateScreeshotOptions(options); + const format = validateScreenshotOptions(options); return this._queue.postTask(async () => { const { viewportSize, originalViewportSize } = await this._originalViewportSize(); @@ -188,7 +188,7 @@ function trimClipToSize(clip: types.Rect, size: types.Size): types.Rect { return result; } -function validateScreeshotOptions(options: types.ScreenshotOptions): 'png' | 'jpeg' { +function validateScreenshotOptions(options: types.ScreenshotOptions): 'png' | 'jpeg' { let format: 'png' | 'jpeg' | null = null; // options.type takes precedence over inferring the type from options.path // because it may be a 0-length file with no extension created beforehand (i.e. as a temp file).