From 1271de96f093f965efe39566e3c4fe82e739dd16 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 8 Jul 2020 12:58:17 +0200 Subject: [PATCH] [Glitch] Fix WebUI crash on sensitive preview card with no preview thumbnail Port 5a6b0ce0511a7e8479dadf64d2460ece8b851f5d to glitch-soc Signed-off-by: Thibaut Girka --- .../flavours/glitch/features/status/components/card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index b4db62f4a9..ab6398e1a5 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(); } }