Skip to content
Browse files

Update libBuilder.js

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...
1 parent d84b64a commit 3f3f8355e020b0591fa57b7656880f51e9ce5129 @wzr1337 wzr1337 committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/libBuilder.js
View
4 lib/libBuilder.js
@@ -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;
}

0 comments on commit 3f3f835

Please sign in to comment.
Something went wrong with that request. Please try again.