Skip to content

Commit

Permalink
fix: dont override exists weburl
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Apr 30, 2019
1 parent 754c74c commit da2f964
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/web/package/show.js
Expand Up @@ -151,7 +151,9 @@ module.exports = function* show(next) {
pkg.repository = null;
}
if (pkg.repository && pkg.repository.url) {
pkg.repository.weburl = /^https?:\/\//.test(pkg.repository.url) ? pkg.repository.url : (giturl.parse(pkg.repository.url) || pkg.repository.url);
if (!pkg.repository.weburl) {
pkg.repository.weburl = /^https?:\/\//.test(pkg.repository.url) ? pkg.repository.url : (giturl.parse(pkg.repository.url) || pkg.repository.url);
}
}
if (!pkg.bugs) {
pkg.bugs = {};
Expand Down

0 comments on commit da2f964

Please sign in to comment.