Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-03 19:47:54 +0400
committerisaacs <i@izs.me>2010-05-03 19:47:54 +0400
commita3dec1abdf971e83377ff167382c56fe26f6c8d6 (patch)
treec8d613066b37ffaf5f69f15cb405006f13951b2f
parente95d912118375e4db14b3b850706715b059c107d (diff)
Handle case where there's no data already installedv0.1.1
-rw-r--r--lib/install.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/install.js b/lib/install.js
index 7e0fcfc1b..9cda3e26a 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -33,7 +33,7 @@ function registryInstall (pkglist, cb) {
// it's helpful to know what we have already
if (!installedPackages) return readInstalled([], function (er, data) {
if (er) return cb(er)
- installedPackages = data
+ installedPackages = data || {}
registryInstall(pkglist, cb)
})