MINOR: fix the favicon not being updated (#19357)

* fix the favicon not being updated

* minor condition check added

(cherry picked from commit a28c30ec7f4561af450482a8d074eabef78fc616)
This commit is contained in:
Ashish Gupta 2025-01-14 20:36:14 +05:30 committed by OpenMetadata Release Bot
parent bde5b277f8
commit 2864e17976

View File

@ -63,10 +63,12 @@ const App: FC = () => {
? '/favicon.png'
: applicationConfig?.customLogoConfig?.customFaviconUrlPath ??
'/favicon.png';
const link = document.querySelector('link[rel~="icon"]');
const link = document.querySelectorAll('link[rel~="icon"]');
if (link) {
link.setAttribute('href', faviconHref);
if (!isEmpty(link)) {
link.forEach((item) => {
item.setAttribute('href', faviconHref);
});
}
}, [applicationConfig]);