Browse Source

Fix usage of this._scrollContainer in scrollbar

master
meriadec 7 years ago
parent
commit
3d6d5f53a3
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 5
      src/components/layout/Default.js

5
src/components/layout/Default.js

@ -38,7 +38,9 @@ class Default extends Component<Props> {
componentDidUpdate(prevProps) {
if (this.props.location !== prevProps.location) {
this._scrollContainer._scrollbar.scrollTo(0, 0)
if (this._scrollContainer) {
this._scrollContainer._scrollbar.scrollTo(0, 0)
}
}
}
@ -47,6 +49,7 @@ class Default extends Component<Props> {
}
_timeout = undefined
_scrollContainer = null
render() {
return (

Loading…
Cancel
Save