components/scroll-manager: don't crash when Buffer is empty

This commit is contained in:
Simon Ser 2022-04-22 12:32:54 +02:00
parent aaef4e1629
commit 8507500d74

View file

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