Skip to content

Commit e6fdb73

Browse files
authored
Merge pull request #22 from mongkok/fix/remove-empty-homepage-link
Remove empty homepage link
2 parents 356ba78 + d6815f3 commit e6fdb73

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

debug_toolbar/statics/js/versions.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function pypiIndex() {
1313
function link(url) {
1414
return `
1515
<a href="${url}" target="_blank">
16-
${$$.truncatechars(url || "", 40)}
16+
${$$.truncatechars(url, 40)}
1717
</a>`;
1818
}
1919
function render(rowVersion, data) {
@@ -31,7 +31,10 @@ function pypiIndex() {
3131

3232
const status = python.nextElementSibling;
3333
status.innerHTML = data.status ? data.status.slice(26) : "";
34-
status.nextElementSibling.innerHTML = link(data.home_page);
34+
35+
if (data.home_page) {
36+
status.nextElementSibling.innerHTML = link(data.home_page);
37+
}
3538
}
3639
function getData(pypi) {
3740
return {

0 commit comments

Comments
 (0)