forked from GitHub/dbot
Merge pull request #624 from amki/rss
Don't crash when rss feed item does not contain pubdate
This commit is contained in:
commit
80d9af6279
@ -47,6 +47,10 @@ var rss = function(dbot) {
|
|||||||
item;
|
item;
|
||||||
|
|
||||||
while (item = stream.read()) {
|
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.lastPosted > 0) {
|
||||||
if(item.pubdate.getTime() > feed.newTime) {
|
if(item.pubdate.getTime() > feed.newTime) {
|
||||||
feed.newTime = item.pubdate.getTime();
|
feed.newTime = item.pubdate.getTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user