fix: Check if empty image
Apparently this is allowed, although the OpenAPI specification disallows it. Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
parent
82c4f8d22f
commit
d16829f45e
|
|
@ -30,7 +30,7 @@ function toItemTag(seriesId: string, episode: OriginalEpisode) {
|
||||||
|
|
||||||
async function buildFeed(seriesId: string) {
|
async function buildFeed(seriesId: string) {
|
||||||
const serie = await nrkRadio.getSerieData(seriesId);
|
const serie = await nrkRadio.getSerieData(seriesId);
|
||||||
const imageUrl = serie.squareImage.at(-1)?.url;
|
const imageUrl = serie.squareImage?.at(-1)?.url ?? "";
|
||||||
const linkValue = `https://radio.nrk.no/podkast/${serie.id}`;
|
const linkValue = `https://radio.nrk.no/podkast/${serie.id}`;
|
||||||
|
|
||||||
// Quickly adapted from https://raw.githubusercontent.com/olaven/paperpod/1cde9abd3174b26e126aa74fc5a3b63fd078c0fd/packages/converter/src/rss.ts
|
// Quickly adapted from https://raw.githubusercontent.com/olaven/paperpod/1cde9abd3174b26e126aa74fc5a3b63fd078c0fd/packages/converter/src/rss.ts
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue