Fix: TypeError when missing author meta
This commit is contained in:
parent
fc51d806da
commit
40a1781a53
|
@ -70,9 +70,13 @@
|
|||
$('.meta-version').textContent = data.version;
|
||||
$('.meta-description').textContent = data.description;
|
||||
|
||||
$('.meta-author').parentNode.style.display = data.author ? '' : 'none';
|
||||
if (data.author) {
|
||||
$('.meta-author').parentNode.style.display = '';
|
||||
$('.meta-author').textContent = '';
|
||||
$('.meta-author').appendChild(makeAuthor(data.author));
|
||||
} else {
|
||||
$('.meta-author').parentNode.style.display = 'none';
|
||||
}
|
||||
|
||||
$('.meta-license').parentNode.style.display = data.license ? '' : 'none';
|
||||
$('.meta-license').textContent = data.license;
|
||||
|
|
Loading…
Reference in New Issue
Block a user