diff options
Diffstat (limited to 'lib/install.js')
-rw-r--r-- | lib/install.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/install.js b/lib/install.js index acfc2aeb7..1a235793d 100644 --- a/lib/install.js +++ b/lib/install.js @@ -868,7 +868,8 @@ function targetResolver (where, context, deps) { function installOne (target, where, context, cb) { // the --link flag makes this a "link" command if it's at the // the top level. - var isGit = npa(target._resolved).type === "git" + var isGit = false + if (target && target._from) isGit = npa(target._from).type === 'git' if (where === npm.prefix && npm.config.get("link") && !npm.config.get("global") && !isGit) { |