Perform deep comparison for card data when receiving new props (#9270)
Fixes #9226
This commit is contained in:
		
							parent
							
								
									886ef1cc38
								
							
						
					
					
						commit
						4ce6ed2021
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -73,7 +73,7 @@ export default class Card extends React.PureComponent {
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  componentWillReceiveProps (nextProps) {
 | 
					  componentWillReceiveProps (nextProps) {
 | 
				
			||||||
    if (this.props.card !== nextProps.card) {
 | 
					    if (!this.props.card.equals(nextProps.card)) {
 | 
				
			||||||
      this.setState({ embedded: false });
 | 
					      this.setState({ embedded: false });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue