mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
components/scroll-manager: don't crash when Buffer is empty
This commit is contained in:
parent
aaef4e1629
commit
8507500d74
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue