mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-02 03:23:43 +00:00
[Glitch] Perform deep comparison for card data when receiving new props
Prevents embedded players from resetting when interacting with the toot
This commit is contained in:
parent
772b4ba24c
commit
ff827c1f38
|
@ -75,7 +75,7 @@ export default class Card extends React.PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
componentWillReceiveProps (nextProps) {
|
||||||
if (this.props.card !== nextProps.card) {
|
if (!Immutable.is(this.props.card, nextProps.card)) {
|
||||||
this.setState({ embedded: false });
|
this.setState({ embedded: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue