Skip to content

Commit

Permalink
Fix WebUI crash on sensitive preview card with no preview thumbnail (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and abcang committed Jul 11, 2020
1 parent 98d8258 commit b90c79a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/features/status/components/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class Card extends React.PureComponent {
componentDidUpdate (prevProps) {
const { card } = this.props;

if (card.get('blurhash') && (!prevProps.card || prevProps.card.get('blurhash') !== card.get('blurhash'))) {
if (card.get('blurhash') && (!prevProps.card || prevProps.card.get('blurhash') !== card.get('blurhash')) && this.canvas) {
this._decode();
}
}
Expand Down

0 comments on commit b90c79a

Please sign in to comment.