about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-08 09:22:23 +0200
committerGitHub <noreply@github.com>2020-07-08 09:22:23 +0200
commit258171549120142a6a7dac40f17ecc2087433f4a (patch)
tree7b404aee3be2de1d61b9d0eacab3a2d3a0883ba3 /app/javascript
parent961789d511ad8742b8bc75d145b3a83ec5d03ad8 (diff)
Fix WebUI crash on sensitive preview card with no preview thumbnail (#14260)
Fixes #14257
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/status/components/card.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js
index 0af7c54e4..0a84e481a 100644
--- a/app/javascript/mastodon/features/status/components/card.js
+++ b/app/javascript/mastodon/features/status/components/card.js
@@ -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();
     }
   }