fallback to repo url before homepage

This commit is contained in:
silverwind 2019-07-19 15:32:04 +02:00
parent c84a4166c6
commit 25bfcf1f58
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -274,6 +274,7 @@ const getInfoUrl = ({repository, homepage}, registry, name) => {
const url = typeof repository === "string" ? repository : repository.url;
const info = gitInfo(url);
if (info && info.browse) return info.browse();
if (repository && repository.url && /^https?:/.test(repository.url)) return repository.url;
}
return homepage || "";