Browse Source
Fix usage of this._scrollContainer in scrollbar
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
4 additions and
1 deletions
-
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 ( |
|
|
|