We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a833cb6 commit a521803Copy full SHA for a521803
src/lib/api/fetchRSS.ts
@@ -42,10 +42,10 @@ export const fetchRSS = async (xmlUrl: string | string[]) => {
42
// Map to RSSItem object
43
.map((item) => {
44
const getImgSrc = () => {
45
- if (url.includes("medium.com/feed/"))
46
- return item["content:encoded"]?.[0].match(
+ if (item["content:encoded"])
+ return item["content:encoded"][0].match(
47
/https?:\/\/[^"]*?\.(jpe?g|png|webp)/g
48
- )
+ )?.[0]
49
if (item.enclosure) return item.enclosure[0].$.url
50
if (item["media:content"]) return item["media:content"][0].$.url
51
return channelImage
0 commit comments