Skip to content

Commit f8cb29d

Browse files
committed
[frontend] use default chrome favicon on img load error
1 parent 3f4905d commit f8cb29d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

frontend/public/defaultfavicon.png

383 Bytes
Loading

frontend/src/components/TabStrip.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ export const DragTab: Component<
109109
}}
110110
>
111111
<div class={use(this.active).map((x) => `main ${x ? "active" : ""}`)}>
112-
<img src={use(this.tab.icon)} />
112+
<img
113+
src={use(this.tab.icon)}
114+
on:error={() => (this.tab.icon = "/defaultfavicon.png")}
115+
/>
113116
<span>{use(this.tab.title)}</span>
114117
<button
115118
class="close"

0 commit comments

Comments
 (0)