Skip to content

Commit

Permalink
fix: readd support for a custom favicon path
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Dec 3, 2024
1 parent 1df6014 commit 7bd4bf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,13 @@ const parseTheme = (theme?: DefaultApplicationTheme): ThemeProperties => {
style['--complementaryColor'] = theme.complementaryColor;
}
if (theme.faviconPath) {
const favicon = document.querySelector('link[rel="shortcut icon"]') as HTMLLinkElement;
const favicon = document.querySelector('link[rel="icon"]') as HTMLLinkElement;
if (favicon) {
favicon.href = theme.faviconPath;
} else {
// If no favicon is set, create a new one
const newLink = document.createElement('link');
newLink.rel = 'shortcut icon';
newLink.rel = 'icon';
newLink.type = 'image/x-icon';
newLink.href = theme.faviconPath;
document.head.appendChild(newLink);
Expand Down

0 comments on commit 7bd4bf4

Please sign in to comment.