]> cat aescling's git repositories - mastodon.git/commitdiff
Fix an error on dragging into status_content component (#3308)
authorunarist <m.unarist@gmail.com>
Thu, 25 May 2017 14:27:44 +0000 (23:27 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 25 May 2017 14:27:44 +0000 (16:27 +0200)
app/javascript/mastodon/components/status_content.js

index 1a474802ab2c7093cbca4b84861a91794b3cf929..06e25b36a66f529ca661cd41b4ece6dc2d2fa054 100644 (file)
@@ -65,6 +65,10 @@ class StatusContent extends React.PureComponent {
   }
 
   handleMouseUp = (e) => {
+    if (!this.startXY) {
+      return;
+    }
+
     const [ startX, startY ] = this.startXY;
     const [ deltaX, deltaY ] = [Math.abs(e.clientX - startX), Math.abs(e.clientY - startY)];