Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c80ba16

Browse files
authored
Merge pull request #6296 from matrix-org/t3chguy/fix/17853
Prevent RoomDirectory from exploding when filterString is wrongly nulled
2 parents a9e28db + d354a0a commit c80ba16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/structures/RoomDirectory.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
370370

371371
private onFilterChange = (alias: string) => {
372372
this.setState({
373-
filterString: alias || null,
373+
filterString: alias || "",
374374
});
375375

376376
// don't send the request for a little bit,
@@ -389,7 +389,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
389389
private onFilterClear = () => {
390390
// update immediately
391391
this.setState({
392-
filterString: null,
392+
filterString: "",
393393
}, this.refreshRoomList);
394394

395395
if (this.filterTimeout) {

0 commit comments

Comments
 (0)