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:
Diffstat (limited to 'lib/npm.js')
-rw-r--r--lib/npm.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/npm.js b/lib/npm.js
index c8965bdc6..63f9be315 100644
--- a/lib/npm.js
+++ b/lib/npm.js
@@ -207,13 +207,13 @@ Object.keys(abbrevs).concat(plumbing).forEach(function addCommand (c) {
npm.registry.refer = [a].concat(args[0]).map(function (arg) {
// exclude anything that might be a URL, path, or private module
// Those things will always have a slash in them somewhere
- if (arg && arg.match(/\/|\\/)) {
+ if (arg && arg.match && arg.match(/\/|\\/)) {
return "[REDACTED]"
} else {
return arg
}
}).filter(function (arg) {
- return arg
+ return arg && arg.match
}).join(" ")
cmd.apply(npm, args)