]> Entropealabs - entropealabs.gitlab.io.git/commitdiff
fix rss with no description
authorChristopher Coté <chris@entropealabs.com>
Fri, 17 Jan 2025 23:02:32 +0000 (18:02 -0500)
committerChristopher Coté <chris@entropealabs.com>
Fri, 17 Jan 2025 23:02:32 +0000 (18:02 -0500)
public/index.html

index f23f394ff01172777baaf9f91c2f4def1bf29e75..3a404b4a905f9b59f6c326d1611da8ac6ece8cdc 100644 (file)
                }
 
                function post(el, cls){
-                       return `<article class="${cls}">
+                       let d = el.querySelector("description")
+                       if(d.firstChild) {
+                               return `<article class="${cls}">
                                                                ${el.querySelector("description").firstChild.wholeText}
                                                                <p class="date">
                                                                        <a href="${el.querySelector("link").innerHTML}" target="_blank" rel="noopener">
                                                                        </a>
                                                                </p>
                                                        </article>`;
+                       }else{
+                               return ``;
+                       }
                }
 
                function atom(el, cls){