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:
authorMartin Cooper <mfncooper@gmail.com>2011-10-09 20:13:03 +0400
committerisaacs <i@izs.me>2011-10-13 04:39:08 +0400
commit0c37406165191dbbe984c65ef2719a4c01f1158e (patch)
tree2860c80dd6d1b73e4b834c29148eb4e98e4d3375 /lib/bugs.js
parenta496bd001f66e55056670b512d4837a8ca347f29 (diff)
Standardize the 'bugs' field in package.json.
Diffstat (limited to 'lib/bugs.js')
-rw-r--r--lib/bugs.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index 39e746592..654f4487b 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -24,11 +24,7 @@ function bugs (args, cb) {
, repo = d.repository || d.repositories
if (bugs) {
if (typeof bugs === "string") return open(bugs, cb)
- if (bugs.url) bugs = bugs.url
- else if (bugs.web) bugs = bugs.web
- else if (bugs.name && /^http/.test(bugs.name)) bugs = bugs.name
- else bugs = null
- if (bugs) return open(bugs, cb)
+ if (bugs.url) return open(bugs.url, cb)
}
if (repo) {
if (Array.isArray(repo)) repo = repo.shift()