Skip to content

Commit

Permalink
Merge pull request #26 from EClaesson/master
Browse files Browse the repository at this point in the history
Added created key to rss items and modified updated.
  • Loading branch information
nasa8x authored Oct 22, 2020
2 parents 2c1ab04 + 7109b35 commit a4899f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rss.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ module.exports = {
obj.url = val.link && val.link.href ? val.link.href : val.link;
obj.link = obj.url;
obj.author = val.author && val.author.name ? val.author.name : val['dc:creator'];
obj.created = val.updated ? Date.parse(val.updated) : val.pubDate ? Date.parse(val.pubDate) : Date.now;
obj.published = val.created ? Date.parse(val.created) : val.pubDate ? Date.parse(val.pubDate) : Date.now();
obj.created = val.updated ? Date.parse(val.updated) : val.pubDate ? Date.parse(val.pubDate) : val.created ? Date.parse(val.created) : Date.now;
obj.category = val.category || [];
obj.content = val.content && val.content.$t ? val.content.$t : null;

Expand Down

0 comments on commit a4899f4

Please sign in to comment.