]> cat aescling's git repositories - mastodon.git/commitdiff
Perform deep comparison for card data when receiving new props (#9270)
authorThibG <thib@sitedethib.com>
Mon, 12 Nov 2018 17:17:50 +0000 (18:17 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 12 Nov 2018 17:17:50 +0000 (18:17 +0100)
Fixes #9226

app/javascript/mastodon/features/status/components/card.js

index 743fe779a20063490eb9b53a6c2cb4e5e0e4101e..3474a11e51087b1ec3a1caf65d5d86e879feceda 100644 (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 });
     }
   }