Skip to content

Commit

Permalink
fix error thrown when calling "indexOf" on Object when # of depencenc…
Browse files Browse the repository at this point in the history
…ies is 0
  • Loading branch information
Craig Condon committed Mar 8, 2012
1 parent 6d67461 commit 40ec591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/require-analyzer.js
Expand Up @@ -163,7 +163,7 @@ analyzer.npmAnalyze = function (deps, options, callback) {
}
Object.keys(result.dependencies).forEach(function (pkg) {
if (result.devDependencies && pkg in result.devDependencies) return;
if (!Array.isArray(deps) && Object.keys(deps).length !== 0) {
if (!Array.isArray(deps)) {
if (deps[pkg] === '*' || typeof deps[pkg] === 'undefined') {
pkgs[pkg] = result.dependencies[pkg]
? result.dependencies[pkg]['version']
Expand Down

0 comments on commit 40ec591

Please sign in to comment.