about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-08 12:58:17 +0200
committerThibaut Girka <thib@sitedethib.com>2020-07-08 15:26:02 +0200
commitb27eecdbfcebc46c8e29c6b834b9c8b25ddfa751 (patch)
tree169e67631fdee4ed24491703595305c5590102d2 /app/javascript/flavours
parenta513997367b050028f3ad6e9a0bff46346b5b832 (diff)
[Glitch] Fix WebUI crash on sensitive preview card with no preview thumbnail
Port d308a863fbd373b94fa571103ad431782c29e074 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/features/status/components/card.js2
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 b4db62f4a..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();
     }
   }