diff --git a/mattermost-plugin/webapp/src/index.tsx b/mattermost-plugin/webapp/src/index.tsx index 46f3b318c..1ea473161 100644 --- a/mattermost-plugin/webapp/src/index.tsx +++ b/mattermost-plugin/webapp/src/index.tsx @@ -55,6 +55,21 @@ const MainApp = () => { } }, []) + useEffect(() => { + const link = (document.querySelector("link[rel*='icon']") || document.createElement('link')) as HTMLLinkElement + const restoreData = { + type: link.type, + rel: link.rel, + href: link.href, + } + return () => { + link.type = restoreData.type + link.rel = restoreData.rel + link.href = restoreData.href + document.getElementsByTagName('head')[0].appendChild(link) + } + }, []) + return (