diff options
author | isaacs <i@izs.me> | 2011-04-01 01:49:57 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-04-01 01:49:57 +0400 |
commit | 85ae2009de484ac1ddf859382d9d9ddca112c030 (patch) | |
tree | 57d4f6031a926277be6f1a0f76e4279fd83d0932 /lib | |
parent | 5dd4ec0b50bd6fe9b758582a9956188a1e80682b (diff) |
create dependency object if missing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/read-json.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/utils/read-json.js b/lib/utils/read-json.js index 493aa0345..55abfe002 100644 --- a/lib/utils/read-json.js +++ b/lib/utils/read-json.js @@ -216,8 +216,7 @@ function processObject (opts, cb) { return function (er, json) { delete json["dev-dependencies"] } ;["dependencies", "devDependencies"].forEach(function (d) { - if (!json[d]) return - json[d] = depObjectify(json[d]) + json[d] = json[d] ? depObjectify(json[d]) : {} }) if (npm.config.get("dev") || npm.config.get("npat")) { Object.keys(json.devDependencies || {}).forEach(function (d) { |