Fix favicon not updating

This commit is contained in:
Ajay Bura 2022-09-04 12:07:07 +05:30
parent 8a2bd500cb
commit 5ecb7b378c

View file

@ -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) {