Skip to content
Snippets Groups Projects
Commit 7e218d10 authored by Christian Bager Bach Houmann's avatar Christian Bager Bach Houmann
Browse files

fix: allow episodes with no description

fixes #46 by allowing podcasts with no description

fix #46
parent d51b89f9
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,7 @@ export default class FeedParser {
const pubDateEl = item.querySelector("pubDate");
const itunesImageEl = item.querySelector("image");
if (!titleEl || !streamUrlEl || !descriptionEl || !pubDateEl) {
if (!titleEl || !streamUrlEl || !pubDateEl) {
console.log(titleEl, streamUrlEl, linkEl, descriptionEl, pubDateEl);
throw new Error("Invalid RSS feed");
}
......@@ -93,7 +93,7 @@ export default class FeedParser {
const title = titleEl.textContent || "";
const streamUrl = streamUrlEl.getAttribute("url") || "";
const url = linkEl?.textContent || "";
const description = descriptionEl.textContent || "";
const description = descriptionEl?.textContent || "";
const pubDate = new Date(pubDateEl.textContent as string);
const artworkUrl = itunesImageEl?.getAttribute("href") || this.feed?.artworkUrl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment