cleanup: Use ES6 default params (#447)

This commit is contained in:
Eric Bidelman
2017-08-21 16:32:39 -07:00
committed by Andrey Lushnikov
parent 271fd09379
commit 5d6d3e0a81
4 changed files with 25 additions and 34 deletions

View File

@@ -427,8 +427,7 @@ class Page extends EventEmitter {
* @param {!Object=} options
* @return {!Promise<!Buffer>}
*/
async screenshot(options) {
options = options || {};
async screenshot(options = {}) {
let screenshotType = null;
if (options.path) {
let mimeType = mime.lookup(options.path);
@@ -506,9 +505,7 @@ class Page extends EventEmitter {
* @param {!Object=} options
* @return {!Promise<!Buffer>}
*/
async pdf(options) {
options = options || {};
async pdf(options = {}) {
let scale = options.scale || 1;
let displayHeaderFooter = !!options.displayHeaderFooter;
let printBackground = !!options.printBackground;