1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Better Set handling

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Germain
2021-05-27 09:23:56 +01:00
committed by GitHub
parent fbb6a42d86
commit b8a7d5d730

View File

@ -69,7 +69,7 @@ interface IState {
contextMenuPosition: PartialDOMRect;
isDarkTheme: boolean;
selectedSpace?: Room;
pendingRoomJoin: Set<string>
pendingRoomJoin: Set<string>;
}
@replaceableComponent("structures.UserMenu")
@ -182,8 +182,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
}
private removePendingJoinRoom(roomId: string): void {
if (this.state.pendingRoomJoin.has(roomId)) {
this.state.pendingRoomJoin.delete(roomId);
if (this.state.pendingRoomJoin.delete(roomId)) {
this.setState({
pendingRoomJoin: new Set<string>(this.state.pendingRoomJoin),
})