Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Grunt plugins lacking package.json keywords should work again. Closes g…

  • Loading branch information...
commit eccef148588d481bacb02cb4fc0b82093fa74ebd 1 parent 9afcd35
Bruno Michel nono authored committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/grunt/task.js
4 lib/grunt/task.js
View
@@ -301,10 +301,10 @@ task.loadNpmTasks = function(name) {
loadTasksMessage('"' + name + '" local Npm module');
var root = path.resolve('node_modules');
var pkgfile = path.join(root, name, 'package.json');
- var pkg = existsSync(pkgfile) ? grunt.file.readJSON(pkgfile) : {keywords: []};
+ var pkg = existsSync(pkgfile) ? grunt.file.readJSON(pkgfile) : {};
// Process collection plugins.
- if (pkg.keywords.indexOf('gruntcollection') !== -1) {
+ if (pkg.keywords && pkg.keywords.indexOf('gruntcollection') !== -1) {
Object.keys(pkg.dependencies).forEach(function(depName) {
// Npm sometimes pulls dependencies out if they're shared, so find
// upwards if not found locally.
Please sign in to comment.
Something went wrong with that request. Please try again.