Skip to content

Commit

Permalink
Perform deep comparison for card data when receiving new props (#9270)
Browse files Browse the repository at this point in the history
Fixes #9226
  • Loading branch information
ClearlyClaire authored and Gargron committed Nov 12, 2018
1 parent c81bdaf commit bbd8fdd
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 bbd8fdd

Please sign in to comment.