diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Bar/index.js b/products/ASC.Files/Client/src/pages/Home/Section/Bar/index.js index 234c02da70..f2b757a3e6 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Bar/index.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Bar/index.js @@ -41,9 +41,12 @@ const bannerHOC = (props) => { }; useEffect(() => { - setTimeout(() => updateBanner(), 10000); + const updateTimeout = setTimeout(() => updateBanner(), 10000); const updateInterval = setInterval(updateBanner, ADS_TIMEOUT); - return () => clearInterval(updateInterval); + return () => { + clearTimeout(updateTimeout); + clearInterval(updateInterval); + }; }, []); const onClose = () => {