Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Perform deep comparison for card data when receiving new props (masto…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed Nov 23, 2018
1 parent 886ef1c commit 4ce6ed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/features/status/components/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class Card extends React.PureComponent {
};

componentWillReceiveProps (nextProps) {
if (this.props.card !== nextProps.card) {
if (!this.props.card.equals(nextProps.card)) {
this.setState({ embedded: false });
}
}
Expand Down

0 comments on commit 4ce6ed2

Please sign in to comment.