diff --git a/index.twig b/index.twig index 469c39a..3d65e9c 100644 --- a/index.twig +++ b/index.twig @@ -64,7 +64,7 @@
Hören! - Mehr erfahren + Mehr erfahren
@@ -194,21 +194,6 @@ return; } - -/**/ - response.text().then(function(data) { //console.log(data); @@ -216,14 +201,15 @@ var lines = data.split('\n'); for (var i = 0;i < lines.length;i++) { - let podcastInfo = lines[i].split(';'); - - const node = document.createElement('div'); - node.classList.add('col-sm-12', 'col-lg-6', 'col-xl-4', 'my-2'); - node.innerHTML = '
' + podcastInfo[0] + '

' + podcastInfo[1] + '

'; - - //node.appendChild(podcastTitle); - podcastDiv.appendChild(node); + if (lines[i].length > 3) { + let podcastInfo = lines[i].split(';'); + + const node = document.createElement('div'); + node.classList.add('col-sm-12', 'col-lg-6', 'col-xl-4', 'my-2'); + node.innerHTML = '
' + podcastInfo[0] + '

' + podcastInfo[1] + '

'; + + podcastDiv.appendChild(node); + } } });