From d6667edd4ca3d3f2811497f348001ff56845ca2c Mon Sep 17 00:00:00 2001 From: Matej Simek Date: Fri, 21 Jun 2019 11:59:32 +0200 Subject: [PATCH] images: fix error when adding empty glob to src --- lib/tasks/images.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tasks/images.js b/lib/tasks/images.js index 23980f7e..ce9bc04c 100644 --- a/lib/tasks/images.js +++ b/lib/tasks/images.js @@ -30,7 +30,10 @@ module.exports = function(gulp, config) { } // Pipe images, with no transform - task.add(gulp.src(glob, { base: config.src_folder, cwd: config.dir, allowEmpty: true })) + if (glob.length) { + task.add(gulp.src(glob, { base: config.src_folder, cwd: config.dir, allowEmpty: true })) + } + // Pipe images, which has to be transformed for (var i = 0; i < imageObjects.length; i++) { (function () {