Skip to content

Commit

Permalink
Fix load RSS feeds when date is empty
Browse files Browse the repository at this point in the history
Fix load RSS feeds when date is empty
  • Loading branch information
gandf committed Apr 15, 2021
1 parent b6d784b commit d0c279c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ function CheckForUnread() {
var thumbnailurl = null;
var thumbnailtype = null;
var thumbnailNode = null;
var dummyDate = null;

if (rootNode != null) {
if (rootNode.nodeName == "feed") {
Expand Down Expand Up @@ -448,7 +449,14 @@ function CheckForUnread() {
item.author = '\u00a0';
}
}
item.order = GetDate(item.date).getTime() - referenceDate;
dummyDate = GetDate(item.date);
if(dummyDate != null)
{
item.order = dummyDate.getTime() - referenceDate;
}
else {
item.order = referenceDate;
}

feedInfo[feedID].items.push(item);
entryIDs[sha256(item.title + item.date)] = 1;
Expand Down

0 comments on commit d0c279c

Please sign in to comment.