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
path: root/lib
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-03-25 23:06:04 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-03-25 23:06:04 +0300
commita840a13bbf0330157536381ea8e58d0bd93b4c05 (patch)
treea79fce28c46a4b4ab1fb9bce103286ded46cbda2 /lib
parentf35aa933e136228a89e3fcfdebe8c7cc4f1e7c00 (diff)
cache: don't test missing strings (fixes #7746)
Diffstat (limited to 'lib')
-rw-r--r--lib/cache/add-remote-git.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cache/add-remote-git.js b/lib/cache/add-remote-git.js
index 9eaf6b18a..cf0a5d4c8 100644
--- a/lib/cache/add-remote-git.js
+++ b/lib/cache/add-remote-git.js
@@ -354,7 +354,7 @@ function getResolved (uri, treeish) {
// https://github.com/npm/npm/issues/3224
var spo = uri.split(parsed.host)
var spr = resolved.split(parsed.host)
- if (spo[1].charAt(0) === ':' && spr[1].charAt(0) === '/') {
+ if (spo[1] && spo[1].charAt(0) === ':' && spr[1] && spr[1].charAt(0) === '/') {
spr[1] = spr[1].slice(1)
}
return spr.join(parsed.host)