[Glitch] Perform deep comparison for card data when receiving new props

Prevents embedded players from resetting when interacting with the toot
master
Thibaut Girka 6 years ago committed by ThibG
parent 772b4ba24c
commit ff827c1f38
  1. 2
      app/javascript/flavours/glitch/features/status/components/card.js

@ -75,7 +75,7 @@ export default class Card extends React.PureComponent {
};
componentWillReceiveProps (nextProps) {
if (this.props.card !== nextProps.card) {
if (!Immutable.is(this.props.card, nextProps.card)) {
this.setState({ embedded: false });
}
}

Loading…
Cancel
Save