diff --git a/src/components/views/rooms/Autocomplete.tsx b/src/components/views/rooms/Autocomplete.tsx index 63f31c07b9..f5cf1a981c 100644 --- a/src/components/views/rooms/Autocomplete.tsx +++ b/src/components/views/rooms/Autocomplete.tsx @@ -260,7 +260,7 @@ export default class Autocomplete extends React.PureComponent { behavior: "auto", block: "nearest", }); - } else { + } else if (this.containerRef.current) { this.containerRef.current.scrollTo({ top: 0 }); } }