Skip to content

Commit

Permalink
fixed issue #14, when closureBuilder run from a grunt watch task, the…
Browse files Browse the repository at this point in the history
… root param got lost
  • Loading branch information
thanpolas committed Dec 12, 2012
1 parent 8f9ea4a commit 24eb4d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tasks/closureBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function validate(grunt, data)
}

var root = data.root;
if (!root) {
if (!root || 0 === root.length) {
grunt.log.error('ERROR'.red + ' :: ' + 'root'.red + ' property is required');
return false;
}
Expand Down
6 changes: 2 additions & 4 deletions tasks/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ module.exports = function(grunt) {
if (Array.isArray(param)) {
if (opt_parsePath){
paramValue = [];
var item = param.shift();
while(item) {
paramValue.push(grunt.file.expand(item));
item = param.shift();
for(var i = 0, len = param.length; i < len; i++) {
paramValue.push(grunt.file.expand(param[i]));
}
}
return ' ' + directive + sp + paramValue.join(' ' + directive + sp);
Expand Down

0 comments on commit 24eb4d7

Please sign in to comment.