3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

Merge pull request #624 from amki/rss

Don't crash when rss feed item does not contain pubdate
This commit is contained in:
Luke Slater 2014-09-19 14:45:18 +01:00
commit 80d9af6279

View File

@ -47,6 +47,10 @@ var rss = function(dbot) {
item;
while (item = stream.read()) {
// If the feed does not give a pubdate for this post, ignore it...
if(!item.pubdate) {
return;
}
if(item.pubdate.getTime() - feed.lastPosted > 0) {
if(item.pubdate.getTime() > feed.newTime) {
feed.newTime = item.pubdate.getTime();