Skip to content

Commit 45830cf

Browse files
contraphated
contra
authored andcommitted
Docs: Improve recipe for empty glob array (closes #2122)
1 parent 126423a commit 45830cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: docs/recipes/running-task-steps-per-folder.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ function getFolders(dir) {
3636
});
3737
}
3838

39-
gulp.task('scripts', function() {
39+
gulp.task('scripts', function(done) {
4040
var folders = getFolders(scriptsPath);
41-
41+
if (folder.length === 0) return done(); // nothing to do!
4242
var tasks = folders.map(function(folder) {
4343
return gulp.src(path.join(scriptsPath, folder, '/**/*.js'))
4444
// concat into foldername.js

0 commit comments

Comments
 (0)