Skip to content

Commit

Permalink
Catch & ignore scan errors
Browse files Browse the repository at this point in the history
Fixes #90
  • Loading branch information
shgysk8zer0 committed Aug 4, 2018
1 parent 3f16ac2 commit 7c53e4a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions js/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ function filterLink(link) {
}

function mapLink(link) {
return {
type: link.type,
href: link.href,
title: link.title || link.href
};
const {type, href, title = link.href} = link;
return {type, href, title};
}

function scanThisPage() {
Expand All @@ -20,7 +17,7 @@ function scanThisPage() {
browser.runtime.sendMessage({
type: 'feeds',
links: feedLinks,
});
}).catch(() => {});
}
}

Expand Down

0 comments on commit 7c53e4a

Please sign in to comment.