Merge pull request #6296 from matrix-org/t3chguy/fix/17853

Prevent RoomDirectory from exploding when filterString is wrongly nulled
pull/21833/head
Michael Telatynski 2021-07-01 21:07:35 +01:00 committed by GitHub
commit c80ba16ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -370,7 +370,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
private onFilterChange = (alias: string) => { private onFilterChange = (alias: string) => {
this.setState({ this.setState({
filterString: alias || null, filterString: alias || "",
}); });
// don't send the request for a little bit, // don't send the request for a little bit,
@ -389,7 +389,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
private onFilterClear = () => { private onFilterClear = () => {
// update immediately // update immediately
this.setState({ this.setState({
filterString: null, filterString: "",
}, this.refreshRoomList); }, this.refreshRoomList);
if (this.filterTimeout) { if (this.filterTimeout) {