Merge pull request from matrix-org/t3chguy/fix/resizeNotifier-optional

Fix crashes with cannot read isResizing of undefined
pull/21833/head
Michael Telatynski 2020-09-14 15:38:02 +01:00 committed by GitHub
commit c6a3b8b783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
src/components/structures

View File

@ -198,7 +198,8 @@ export default class ScrollPanel extends React.Component {
}
onScroll = ev => {
if (this.props.resizeNotifier.isResizing) return; // skip scroll events caused by resizing
// skip scroll events caused by resizing
if (this.props.resizeNotifier && this.props.resizeNotifier.isResizing) return;
debuglog("onScroll", this._getScrollNode().scrollTop);
this._scrollTimeout.restart();
this._saveScrollState();