Skip to content

Commit

Permalink
Update libBuilder.js
Browse files Browse the repository at this point in the history
If a user does not specify 'input' in his Gruntfile.js, the builder fails complaining about .length not being available on undefined.
With this small fix the user gets the right hint to either fill inputs or namespace property.
  • Loading branch information
wzr1337 committed Apr 10, 2013
1 parent d84b64a commit 3f3f835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/libBuilder.js
Expand Up @@ -46,8 +46,8 @@ builder.validate = function ( options )
// ---
var inputs = options.inputs || [];
var namespaces = options.namespaces;
if (0 === inputs.length && !namespaces) {
cHelpers.log.error('src'.red + ' or ' + 'namespaces'.red +
if ((!inputs || 0 === inputs.length) && !namespaces) {
cHelpers.log.error('inputs'.red + ' or ' + 'namespaces'.red +
' properties are required');
return false;
}
Expand Down

0 comments on commit 3f3f835

Please sign in to comment.