From: ThibG Date: Mon, 12 Nov 2018 17:17:50 +0000 (+0100) Subject: Perform deep comparison for card data when receiving new props (#9270) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=bbd8fdd185063d8b2464b20ee95c366718b75fc6;p=mastodon.git Perform deep comparison for card data when receiving new props (#9270) Fixes #9226 --- diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js index 743fe779a..3474a11e5 100644 --- a/app/javascript/mastodon/features/status/components/card.js +++ b/app/javascript/mastodon/features/status/components/card.js @@ -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 }); } }