Fix bug when the node module is called without any option

This commit is contained in:
Gaël Métais
2021-05-11 00:11:47 +01:00
parent 0e14b5bd04
commit 280b564ab3
+1 -1
View File
@@ -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