about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-08 09:22:23 +0200
committerThibaut Girka <thib@sitedethib.com>2020-07-08 15:25:31 +0200
commita513997367b050028f3ad6e9a0bff46346b5b832 (patch)
tree83971c01ad3f2b150f2175945ba35999d6c715b3 /app
parentde938023abba01ca36eeac6f3bc0203121157116 (diff)
[Glitch] Fix WebUI crash on sensitive preview card with no preview thumbnail
Port 258171549120142a6a7dac40f17ecc2087433f4a to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app')
-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 4b6676062..b4db62f4a 100644
--- a/app/javascript/flavours/glitch/features/status/components/card.js
+++ b/app/javascript/flavours/glitch/features/status/components/card.js
@@ -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();
     }
   }