mirror of https://github.com/vector-im/riot-web
Merge pull request #4688 from matrix-org/t3chguy/autocomplete-scrollintoview
add null-guard for Autocomplete containerRefpull/21833/head
commit
6d11b4f99b
|
@ -260,7 +260,7 @@ export default class Autocomplete extends React.PureComponent<IProps, IState> {
|
|||
behavior: "auto",
|
||||
block: "nearest",
|
||||
});
|
||||
} else {
|
||||
} else if (this.containerRef.current) {
|
||||
this.containerRef.current.scrollTo({ top: 0 });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue