Web: Files: MediaViewer: fix memory leak

This commit is contained in:
Viktor Fomin 2022-05-16 14:31:29 +03:00
parent 18556d96af
commit f8ce260d91

View File

@ -42,6 +42,8 @@ const FilesMediaViewer = (props) => {
useEffect(() => {
window.addEventListener("popstate", onButtonBackHandler);
return () => window.removeEventListener("popstate", onButtonBackHandler);
}, [onButtonBackHandler]);
const onButtonBackHandler = () => {