diff options
author | Rebecca Turner <me@re-becca.org> | 2017-02-28 01:45:39 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-03-10 03:05:24 +0300 |
commit | 195a61bcc5b88fd4446f1729a327539393679592 (patch) | |
tree | d84ac0b00ccbcee38ed4fc0750d744cbd84f20fa /lib/outdated.js | |
parent | 07e997a7ecedba7b29ad76ffb2ce990d5c0200fc (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.js | 2 |
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() |