Skip to content

Commit

Permalink
fix: allow no rectangle for screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
blakebyrnes committed Aug 11, 2021
1 parent b16ed81 commit e4d5597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/Tab.ts
Expand Up @@ -422,7 +422,7 @@ export default class Tab extends TypedEventEmitter<ITabEventParams> {
}

public takeScreenshot(options: IScreenshotOptions = {}): Promise<Buffer> {
options.rectangle.scale ??= 1;
if (options.rectangle) options.rectangle.scale ??= 1;
return this.puppetPage.screenshot(options.format, options.rectangle, options.jpegQuality);
}

Expand Down

0 comments on commit e4d5597

Please sign in to comment.