mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Merge pull request #4688 from matrix-org/t3chguy/autocomplete-scrollintoview
add null-guard for Autocomplete containerRef
This commit is contained in:
commit
6d11b4f99b
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue