Skip to content

Commit

Permalink
Fix compatibility with latest dir-glob release (#99)
Browse files Browse the repository at this point in the history
This bug fixes problem with latest dir-glob@2.2.0

Related to kevva/dir-glob#9
  • Loading branch information
doochik authored and sindresorhus committed Jan 9, 2019
1 parent 7f9f31b commit d804228
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Expand Up @@ -47,7 +47,10 @@ const generateGlobTasks = (patterns, taskOptions) => {
};

const globDirs = (task, fn) => {
let options = {cwd: task.options.cwd};
let options = {};
if (task.options.cwd) {
options.cwd = task.options.cwd;
}

if (Array.isArray(task.options.expandDirectories)) {
options = Object.assign(options, {files: task.options.expandDirectories});
Expand Down

0 comments on commit d804228

Please sign in to comment.