mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
perf: tab icon load error
This commit is contained in:
parent
9acafed459
commit
654a90626e
@ -79,6 +79,12 @@
|
|||||||
const faviconItem = this.tabs.find(item => item.id === id)
|
const faviconItem = this.tabs.find(item => item.id === id)
|
||||||
if (faviconItem) {
|
if (faviconItem) {
|
||||||
faviconItem.icon = detail.favicons[detail.favicons.length - 1]
|
faviconItem.icon = detail.favicons[detail.favicons.length - 1]
|
||||||
|
//
|
||||||
|
const img = new Image();
|
||||||
|
img.onerror = () => {
|
||||||
|
faviconItem.icon = ''
|
||||||
|
};
|
||||||
|
img.src = faviconItem.icon
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user