about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-05-10 14:01:21 -0700
committerReverite <github@reverite.sh>2019-05-10 14:01:21 -0700
commitb403052b6759c8a87fc8e20304c0c31c05412313 (patch)
tree2fec2ff388988a2f6388c785ba1a7bed7964613d /app/javascript/flavours/glitch/features
parent5b85256b334b13fad26a2bc073a874750a3cdc2e (diff)
parentd4d4e84324701243ce05930f45b2dc876e38c7d0 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r--app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js4
-rw-r--r--app/javascript/flavours/glitch/features/video/index.js6
2 files changed, 8 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js
index 2da0770d3..814f9a97a 100644
--- a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js
+++ b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js
@@ -1,5 +1,5 @@
 import { connect } from 'react-redux';
-import { defineMessages } from 'react-intl';
+import { defineMessages, injectIntl } from 'react-intl';
 import ComposeForm from '../components/compose_form';
 import {
   changeCompose,
@@ -133,4 +133,4 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
 
 });
 
-export default connect(mapStateToProps, mapDispatchToProps)(ComposeForm);
+export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ComposeForm));
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);