Skip to content

Commit

Permalink
Merge pull request #39 from JaredAAT/fix-empty-rss-items
Browse files Browse the repository at this point in the history
entry and items might not exist, default to an empty array
  • Loading branch information
nasa8x authored Jul 16, 2022
2 parents 585b643 + 380f74d commit 056b11a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default async (url: string, config: AxiosRequestConfig) => {
items: []
};

let items = channel.item || channel.entry;
let items = channel.item || channel.entry || [];
if (items && !Array.isArray(items)) items = [items];


Expand Down

0 comments on commit 056b11a

Please sign in to comment.