Skip to content

Commit

Permalink
Improves the detection of the favicon icon. (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp authored Mar 23, 2024
1 parent bfb7994 commit 36a4944
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thirty-laws-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-vtbot": patch
---

Improves the detection of the favicon icon.
2 changes: 1 addition & 1 deletion components/loading-indicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function vtbotLoadingIndicator(options: Options) {

const favicon =
(options.src ||
(document.querySelector(`link[rel="icon"]:last-of-type`) as HTMLLinkElement)?.href) ??
(document.querySelector(`link[rel*="icon"]:last-of-type`) as HTMLLinkElement)?.href) ??
'/favicon.ico';

let src = '';
Expand Down

0 comments on commit 36a4944

Please sign in to comment.