fix memory leak

This commit is contained in:
plebeius.eth
2023-06-29 16:45:12 +02:00
parent cfdc7109e1
commit 37d8cfc114
7 changed files with 64 additions and 14 deletions
+9 -2
View File
@@ -509,13 +509,20 @@ const Thread = () => {
useEffect(() => {
let isActive = true;
if (publishCommentEditOptions && triggerPublishCommentEdit) {
(async () => {
await publishCommentEdit();
setTriggerPublishCommentEdit(false);
if (isActive) {
setTriggerPublishCommentEdit(false);
}
})();
}
}, [publishCommentEditOptions, triggerPublishCommentEdit, publishCommentEdit]);
return () => {
isActive = false;
};
}, [triggerPublishCommentEdit, publishCommentEdit, publishCommentEditOptions]);
// mobile navbar board select functionality
const handleSelectChange = (event) => {