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-version').textContent = data.version;
|
||||||
$('.meta-description').textContent = data.description;
|
$('.meta-description').textContent = data.description;
|
||||||
|
|
||||||
$('.meta-author').parentNode.style.display = data.author ? '' : 'none';
|
if (data.author) {
|
||||||
$('.meta-author').textContent = '';
|
$('.meta-author').parentNode.style.display = '';
|
||||||
$('.meta-author').appendChild(makeAuthor(data.author));
|
$('.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').parentNode.style.display = data.license ? '' : 'none';
|
||||||
$('.meta-license').textContent = data.license;
|
$('.meta-license').textContent = data.license;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user