Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix participant detail view without delegation #4336

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent {
// TODO: Open groups subscription
this.groups = this.groupRepo.getViewModelListWithoutSystemGroupsObservable();

this.disableExpandControl = this.user.vote_delegations_from();
this.disableExpandControl = this.user?.hasVoteRightFromOthers ? this.user.vote_delegations_from() : [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it suffice to rewrite vote_delegations_from so it returns [] if there are no delegations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I looked at the error message again, that looks like either the user or the meeting_user has not yet loaded at that point. Probably need to ensure that happens first or maybe add a cheeky little '?' after the offending variable, before calling vote_delegations_from. Your choice.

}

public isAllowed(action: string): boolean {
Expand Down