diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 8291ff3c8..2e0d59d47 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -166,6 +166,10 @@ export default class Video extends React.PureComponent { setCanvasRef = c => { this.canvas = c; + + if (c && this.props.blurhash) { + this._decode(); + } } handleMouseDownRoot = e => { @@ -310,6 +314,8 @@ export default class Video extends React.PureComponent { } _decode () { + if (!this.canvas) return; + const hash = this.props.blurhash; const pixels = decode(hash, 32, 32);