Skip to content

Commit

Permalink
Fix deleting of accordion block
Browse files Browse the repository at this point in the history
  • Loading branch information
iFlameing committed Nov 4, 2024
1 parent 530c27a commit fe56580
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const AccordionEdit = (props) => {
};

React.useEffect(() => {
return data.collapsed && setActiveIndex([]);
if (data.collapsed) {
setActiveIndex([]);
}
}, [data.collapsed]);

return (
Expand Down

0 comments on commit fe56580

Please sign in to comment.