mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
fix reading Set length
This commit is contained in:
parent
2d15d66df8
commit
fbb6a42d86
@ -190,8 +190,8 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||
}
|
||||
}
|
||||
|
||||
get hasPendingActions(): boolean {
|
||||
return Array.from(this.state.pendingRoomJoin).length > 0;
|
||||
get pendingActionsCount(): number {
|
||||
return Array.from(this.state.pendingRoomJoin).length;
|
||||
}
|
||||
|
||||
private onOpenMenuClick = (ev: React.MouseEvent) => {
|
||||
@ -655,11 +655,11 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||
/>
|
||||
</span>
|
||||
{name}
|
||||
{this.hasPendingActions && (
|
||||
{this.pendingActionsCount > 0 && (
|
||||
<InlineSpinner>
|
||||
<TooltipButton helpText={_t(
|
||||
"Currently joining %(count)s rooms",
|
||||
{ count: this.state.pendingRoomJoin.length },
|
||||
{ count: this.pendingActionsCount },
|
||||
)} />
|
||||
</InlineSpinner>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user