diff --git a/src/tab.js b/src/tab.js index 5d58ea5..86405d3 100644 --- a/src/tab.js +++ b/src/tab.js @@ -141,9 +141,12 @@ SideTab.prototype = { const imgTest = document.createElement("img"); imgTest.src = favIconUrl; imgTest.onerror = () => { - this._iconView.style.backgroundImage = ""; + this.resetIcon(); }; }, + resetIcon() { + this._iconView.style.backgroundImage = ""; + }, setLoading(isLoading) { toggleClass(this.view, "loading", isLoading); if (isLoading) { diff --git a/src/tablist.js b/src/tablist.js index ffa8a1a..60e759d 100644 --- a/src/tablist.js +++ b/src/tablist.js @@ -648,7 +648,11 @@ SideTabList.prototype = { setIcon(tab) { let sidetab = this.getTab(tab); if (sidetab) { - sidetab.updateIcon(tab.favIconUrl); + if (tab.favIconUrl) { + sidetab.updateIcon(tab.favIconUrl); + } else { + sidetab.resetIcon(); + } } }, setLoading(tab, isLoading) {