diff options
author | ThibG <thib@sitedethib.com> | 2020-07-08 16:25:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-08 16:25:03 +0200 |
commit | 54e62f8500e69fb0172d565d062354bc6c19b012 (patch) | |
tree | b5ff100059ab31e064c33f5df8f33301febb5609 /app/javascript/flavours/glitch/features/status/components/card.js | |
parent | c41da2e96294dc24ba7e039cd3151916fff664db (diff) | |
parent | 11446be6d13f6d4748227a329dcc75c5c78c915d (diff) |
Merge pull request #1378 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/status/components/card.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/card.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index 4b6676062..ab6398e1a 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -86,7 +86,7 @@ export default class Card extends React.PureComponent { componentDidMount () { window.addEventListener('resize', this.handleResize, { passive: true }); - if (this.props.card && this.props.card.get('blurhash')) { + if (this.props.card && this.props.card.get('blurhash') && this.canvas) { this._decode(); } } @@ -98,7 +98,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(); } } |