mirror of https://github.com/vector-im/riot-web
add null-guard for Autocomplete containerRef
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
66a945b26c
commit
b120488857
|
@ -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