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:
authorRebecca Turner <me@re-becca.org>2017-02-28 01:45:39 +0300
committerKat Marchán <kzm@sykosomatic.org>2017-03-10 03:05:24 +0300
commit195a61bcc5b88fd4446f1729a327539393679592 (patch)
treed84ac0b00ccbcee38ed4fc0750d744cbd84f20fa /lib/outdated.js
parent07e997a7ecedba7b29ad76ffb2ce990d5c0200fc (diff)
outdated: Add variable guard
PR-URL: https://github.com/npm/npm/pull/15888 Credit: @iarna Reviewed-By: @zkat
Diffstat (limited to 'lib/outdated.js')
-rw-r--r--lib/outdated.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/outdated.js b/lib/outdated.js
index a4a0d15ab..546d14b13 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -357,7 +357,7 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) {
}
}
- if (curr.version !== wanted) {
+ if (!curr || curr.version !== wanted) {
doIt(wanted, latest)
} else {
skip()