Skip to content

Commit

Permalink
Make guard in componentDidUpdate less specific
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCBrammer committed Jan 23, 2025
1 parent a955344 commit 6b7a52f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class ReactionDetails extends Component {

componentDidUpdate(prevProps) {
const { reaction } = this.props;
if (reaction.id !== prevProps.reaction.id) {
if (reaction !== prevProps.reaction) {
this.setState({ reaction });
}
}
Expand Down

0 comments on commit 6b7a52f

Please sign in to comment.