diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-03-05 22:51:23 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-03-05 23:22:29 +0100 |
commit | ff827c1f38e91f2ef0ac3ee1c92f0f8a1a3cbdfa (patch) | |
tree | 85fa27e75b94dc42e985b104d53b50c0d8007481 /app/javascript | |
parent | 772b4ba24c60e0394d25d0fad4eefb338a9befea (diff) |
[Glitch] Perform deep comparison for card data when receiving new props
Prevents embedded players from resetting when interacting with the toot
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/card.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index e405a5ef0..f974a87a1 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/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 }); } } |