Skip to content

Commit

Permalink
adding back unsubscribeVisibilityListener in useEffect hook
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah committed Jul 6, 2023
1 parent 343a43c commit 2ca339e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ function ReportActionsView(props) {
setNewMarkerReportActionID('');
}
});
return () => {
if (!unsubscribeVisibilityListener.current) {
return;
}
unsubscribeVisibilityListener.current();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

Expand Down

0 comments on commit 2ca339e

Please sign in to comment.