Web: Files: MediaViewer: fix memory leak
This commit is contained in:
parent
18556d96af
commit
f8ce260d91
@ -42,6 +42,8 @@ const FilesMediaViewer = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("popstate", onButtonBackHandler);
|
||||
|
||||
return () => window.removeEventListener("popstate", onButtonBackHandler);
|
||||
}, [onButtonBackHandler]);
|
||||
|
||||
const onButtonBackHandler = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user