1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 23:08:25 +09:00

Perform deep comparison for card data when receiving new props (#9270)

Fixes #9226
This commit is contained in:
ThibG 2018-11-12 18:17:50 +01:00 committed by Eugen Rochko
parent c81bdafb07
commit bbd8fdd185

View File

@ -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 });
}
}