about summary refs log tree commit diff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorHenry Smith <henry@henrysmith.org>2017-04-11 21:58:28 +0200
committerEugen <eugen@zeonfederated.com>2017-04-11 21:58:28 +0200
commit1921c5416b08d8374ee7aee6c072eed9b67c58c8 (patch)
tree9295b7bad881d649c9d52f6f3ebffb8dcd3cbf6b /app/assets/javascripts
parentfc47c1d00e507f0bee2575c91822d68b72a22bac (diff)
Fix console error when scrolling a column with no scrollable content (#1574)
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/components/features/ui/components/column.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/ui/components/column.jsx b/app/assets/javascripts/components/features/ui/components/column.jsx
index 2b7e11bf1..057b1a9af 100644
--- a/app/assets/javascripts/components/features/ui/components/column.jsx
+++ b/app/assets/javascripts/components/features/ui/components/column.jsx
@@ -41,8 +41,11 @@ const Column = React.createClass({
   mixins: [PureRenderMixin],
 
   handleHeaderClick () {
-    let node = ReactDOM.findDOMNode(this);
-    this._interruptScrollAnimation = scrollTop(node.querySelector('.scrollable'));
+    const scrollable = ReactDOM.findDOMNode(this).querySelector('.scrollable');
+    if (!scrollable) {
+      return;
+    }
+    this._interruptScrollAnimation = scrollTop(scrollable);
   },
 
   handleWheel () {