Skip to content

Commit

Permalink
fix: empty feed error
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Aug 13, 2019
1 parent ffcfa87 commit 1d70711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/background/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function handleRSS (feeds, tabId, useCache) {
feeds && feeds.forEach((feed) => {
feed.image = tab.favIconUrl || feed.image;
});
window.pageRSS[tabId] = feeds.filter((feed) => !feed.uncertain) || [];
window.pageRSS[tabId] = feeds && feeds.filter((feed) => !feed.uncertain) || [];

window.websiteRSSHub[tabId] = getWebsiteRSSHub(tab.url) || [];

Expand All @@ -227,7 +227,7 @@ export function handleRSS (feeds, tabId, useCache) {
});
});

feeds.filter((feed) => feed.uncertain).forEach((feed) => {
feeds && feeds.filter((feed) => feed.uncertain).forEach((feed) => {
rssParser.parseURL(feed.url, (err, result) => {
if (!err) {
feed.title = result.title;
Expand Down

0 comments on commit 1d70711

Please sign in to comment.