Skip to content

Commit

Permalink
images: fix error when adding empty glob to src
Browse files Browse the repository at this point in the history
  • Loading branch information
enzy committed Jun 21, 2019
1 parent 01d6d4e commit d6667ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/tasks/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit d6667ed

Please sign in to comment.