From 280b564ab306065161016d1254493f130dad1755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Tue, 11 May 2021 00:11:47 +0100 Subject: [PATCH] Fix bug when the node module is called without any option --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 620c25c..7d71c7c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -32,7 +32,7 @@ var yellowLabTools = function(url, options) { .then(function(data) { // If a screenshot saveFunction was provided in the options - if (typeof options.saveScreenshotFn === 'function') { + if (options && typeof options.saveScreenshotFn === 'function') { debug('Now optimizing screenshot...'); // Remove uneeded temp screenshot path