Skip to content

Commit

Permalink
Fix error when we are deleting the accordion block in edit mode. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
iFlameing authored Nov 5, 2024
1 parent 530c27a commit 25cf02d
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 25cf02d

Please sign in to comment.