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

Fixes #9226
lolsob-rspec
ThibG 2018-11-12 18:17:50 +01:00 committed by Eugen Rochko
parent a82563aebd
commit df154d2ffa
1 changed files with 1 additions and 1 deletions

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