goupilew commited on
Commit
4a03045
·
unverified ·
1 Parent(s): e8c0c11

[fix] Add placeholder param for sources icon (#1554)

Browse files
src/lib/components/chat/ChatMessage.svelte CHANGED
@@ -335,7 +335,8 @@
335
  >
336
  <img
337
  class="h-3.5 w-3.5 rounded"
338
- src="https://www.google.com/s2/favicons?sz=64&domain_url={new URL(link).hostname}"
 
339
  alt="{title} favicon"
340
  />
341
  <div>{new URL(link).hostname.replace(/^www\./, "")}</div>
@@ -356,7 +357,8 @@
356
  >
357
  <img
358
  class="h-3.5 w-3.5 rounded"
359
- src="https://www.google.com/s2/favicons?sz=64&domain_url={new URL(uri).hostname}"
 
360
  alt="{title} favicon"
361
  />
362
  <div>{title}</div>
 
335
  >
336
  <img
337
  class="h-3.5 w-3.5 rounded"
338
+ src="https://www.google.com/s2/favicons?sz=64&domain_url={new URL(link).hostname ||
339
+ 'placeholder'}"
340
  alt="{title} favicon"
341
  />
342
  <div>{new URL(link).hostname.replace(/^www\./, "")}</div>
 
357
  >
358
  <img
359
  class="h-3.5 w-3.5 rounded"
360
+ src="https://www.google.com/s2/favicons?sz=64&domain_url={new URL(uri).hostname ||
361
+ 'placeholder'}"
362
  alt="{title} favicon"
363
  />
364
  <div>{title}</div>