From 0a914c820a5dbdbf2a83a73c6ec2be26db602168 Mon Sep 17 00:00:00 2001 From: amki Date: Thu, 18 Sep 2014 21:06:17 +0000 Subject: [PATCH] Don't crash when rss feed item does not contain pubdate --- modules/rss/rss.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/rss/rss.js b/modules/rss/rss.js index 81553e5..ced2c4b 100644 --- a/modules/rss/rss.js +++ b/modules/rss/rss.js @@ -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();