1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-24 07:06:28 +09:00

Fix console error when scrolling a column with no scrollable content (#1574)

This commit is contained in:
Henry Smith 2017-04-11 21:58:28 +02:00 committed by Eugen
parent fc47c1d00e
commit 1921c5416b

View File

@ -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 () {