forked from CringeStudios/gamja
components/scroll-manager: don't crash when Buffer is empty
This commit is contained in:
parent
aaef4e1629
commit
8507500d74
@ -34,6 +34,9 @@ export default class ScrollManager extends Component {
|
||||
|
||||
restoreScrollPosition() {
|
||||
let target = this.props.target.current;
|
||||
if (!target.firstChild) {
|
||||
return;
|
||||
}
|
||||
|
||||
let stickToKey = store.get(this.props.scrollKey);
|
||||
if (!stickToKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user