perf: tab icon load error

This commit is contained in:
kuaifan 2024-04-08 14:06:45 +08:00
parent 9acafed459
commit 654a90626e

View File

@ -79,6 +79,12 @@
const faviconItem = this.tabs.find(item => item.id === id)
if (faviconItem) {
faviconItem.icon = detail.favicons[detail.favicons.length - 1]
//
const img = new Image();
img.onerror = () => {
faviconItem.icon = ''
};
img.src = faviconItem.icon
}
break