You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
fix reading Set length
This commit is contained in:
@ -190,8 +190,8 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasPendingActions(): boolean {
|
get pendingActionsCount(): number {
|
||||||
return Array.from(this.state.pendingRoomJoin).length > 0;
|
return Array.from(this.state.pendingRoomJoin).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onOpenMenuClick = (ev: React.MouseEvent) => {
|
private onOpenMenuClick = (ev: React.MouseEvent) => {
|
||||||
@ -655,11 +655,11 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{name}
|
{name}
|
||||||
{this.hasPendingActions && (
|
{this.pendingActionsCount > 0 && (
|
||||||
<InlineSpinner>
|
<InlineSpinner>
|
||||||
<TooltipButton helpText={_t(
|
<TooltipButton helpText={_t(
|
||||||
"Currently joining %(count)s rooms",
|
"Currently joining %(count)s rooms",
|
||||||
{ count: this.state.pendingRoomJoin.length },
|
{ count: this.pendingActionsCount },
|
||||||
)} />
|
)} />
|
||||||
</InlineSpinner>
|
</InlineSpinner>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user