Skip to content

Commit

Permalink
fix(screenshotter) validateScreeshotOptions typo (#1509)
Browse files Browse the repository at this point in the history
There is a type in the function name
  • Loading branch information
kblok authored Mar 24, 2020
1 parent 4f89e40 commit 8d5433c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/screenshotter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class Screenshotter {
}

async screenshotPage(options: types.ScreenshotOptions = {}): Promise<platform.BufferType> {
const format = validateScreeshotOptions(options);
const format = validateScreenshotOptions(options);
return this._queue.postTask(async () => {
const { viewportSize, originalViewportSize } = await this._originalViewportSize();

Expand All @@ -103,7 +103,7 @@ export class Screenshotter {
}

async screenshotElement(handle: dom.ElementHandle, options: types.ElementScreenshotOptions = {}): Promise<platform.BufferType> {
const format = validateScreeshotOptions(options);
const format = validateScreenshotOptions(options);
return this._queue.postTask(async () => {
const { viewportSize, originalViewportSize } = await this._originalViewportSize();

Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit 8d5433c

Please sign in to comment.