about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-08 12:58:17 +0200
committerGitHub <noreply@github.com>2020-07-08 12:58:17 +0200
commitd308a863fbd373b94fa571103ad431782c29e074 (patch)
treec129b91c1ea7270a82da34360a0deeda6e2e13dc
parent606c975050e8d656ceb7130797d8adbcd12f0e49 (diff)
Fix WebUI crash on sensitive preview card with no preview thumbnail (#14261)
Follow-up on #14260 which only fixed half the call sites
-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 0a84e481a..971682df8 100644
--- a/app/javascript/mastodon/features/status/components/card.js
+++ b/app/javascript/mastodon/features/status/components/card.js
@@ -94,7 +94,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();
     }
   }