Fix favicon not updating
This commit is contained in:
parent
8a2bd500cb
commit
5ecb7b378c
1 changed files with 6 additions and 1 deletions
|
@ -120,7 +120,12 @@ export function cssVar(name) {
|
|||
}
|
||||
|
||||
export function setFavicon(url) {
|
||||
document.querySelector('[rel=icon]').href = url;
|
||||
const oldFav = document.querySelector('[rel=icon]');
|
||||
oldFav.parentElement.removeChild(oldFav);
|
||||
const fav = document.createElement('link');
|
||||
fav.rel = 'icon';
|
||||
fav.href = url;
|
||||
document.head.appendChild(fav);
|
||||
}
|
||||
|
||||
export async function getBadgedFavicon(favUrl, color) {
|
||||
|
|
Loading…
Reference in a new issue