Skip to content

Commit

Permalink
Revert previous change on state (#97121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ouikhuan authored Dec 6, 2024
1 parent 0439ab9 commit 6d68a1e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/components/src/foldable-card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ class FoldableCard extends Component {

// @TODO: Please update https://github.com/Automattic/wp-calypso/issues/58453 if you are refactoring away from UNSAFE_* lifecycle methods!
UNSAFE_componentWillReceiveProps( nextProps ) {
if (
nextProps.expanded !== this.props.expanded ||
nextProps.expanded !== this.state.expanded
) {
if ( nextProps.expanded !== this.props.expanded ) {
this.setState( { expanded: nextProps.expanded } );
}
}
Expand Down

0 comments on commit 6d68a1e

Please sign in to comment.