Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Commit

Permalink
Handle favicon errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eoger committed Oct 22, 2017
1 parent 723b42e commit 6c94073
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ SideTab.prototype = {
return;
}
this._iconView.style.backgroundImage = `url("${favIconUrl}")`;
var imgTest = document.createElement('img');
imgTest.src = favIconUrl;
imgTest.onerror = () => {
this._iconView.style.backgroundImage = "";
};
},
setLoading(isLoading) {
toggleClass(this.view, "loading", isLoading);
Expand Down

0 comments on commit 6c94073

Please sign in to comment.