Skip to content

Commit 6778f2d

Browse files
authored
Merge pull request #30 from neizod/main
Fix XML parsing for sites with only one entry
2 parents 5c4bfc2 + f64f48a commit 6778f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const parseRSS = (xmldata) => {
8585
item = []
8686
} = channel
8787

88-
const entries = item.map(nomalizeRssItem)
88+
const entries = isArray(item) ? item.map(nomalizeRssItem) : [nomalizeAtomItem(item)]
8989

9090
return {
9191
title,

0 commit comments

Comments
 (0)