Skip to content

Commit 2a8f643

Browse files
committed
fix: handle invalid image objects found in some RSS feeds
1 parent fc5c60e commit 2a8f643

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/util.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ export const getEpisodeAudioUrlAndExt = (
208208
};
209209

210210
export const getImageUrl = ({ image, itunes }) => {
211-
if (image?.url) {
211+
if (image?.url && typeof image.url === "string") {
212212
return image.url;
213213
}
214214

215-
if (image?.link) {
215+
if (image?.link && typeof image.link === "string") {
216216
return image.link;
217217
}
218218

219-
if (itunes?.image) {
219+
if (itunes?.image && typeof itunes.image === "string") {
220220
return itunes.image;
221221
}
222222

0 commit comments

Comments
 (0)