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

Prevent thrown Error for an active poll #3807

Closed
Elblinator opened this issue Jun 28, 2024 · 2 comments
Closed

Prevent thrown Error for an active poll #3807

Elblinator opened this issue Jun 28, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@Elblinator
Copy link
Member

Current behaviour:
If any poll is running and you navigate to the autopilot, then the following Errors (or similar ones) are thrown in the console:

data-store.service.ts:314 ERROR 
TypeError: Cannot read properties of undefined (reading 'includes')
    at AssignmentPollVoteComponent.defineVoteOptions (base-poll-vote.component.ts:489:42)
    at AssignmentPollVoteComponent.ngOnInit (base-poll-vote.component.ts:176:14)
    at callHookInternal (core.mjs:4024:14)
    at callHook (core.mjs:4051:13)
    at callHooks (core.mjs:4006:17)
    at executeInitAndCheckHooks (core.mjs:3956:9)
    at refreshView (core.mjs:13513:21)
    at detectChangesInView (core.mjs:13663:9)
    [...]

and other example:

TypeError: Cannot read properties of undefined (reading 'length')
    at AssignmentPollVoteComponent_ng_template_1_ng_container_1_ng_container_1_div_3_div_2_b_2_Template (base-poll-vote.component.html:67:29)
    at executeTemplate (core.mjs:12003:13)
    at refreshView (core.mjs:13498:13)
    at detectChangesInView (core.mjs:13663:9)
    at detectChangesInEmbeddedViews (core.mjs:13606:13)
    at refreshView (core.mjs:13522:9)
    at detectChangesInView (core.mjs:13663:9)
    at detectChangesInEmbeddedViews (core.mjs:13606:13)
    at refreshView (core.mjs:13522:9)
    [...]

Reproduction:

  1. create any poll (assignment, topic or motion)
  2. start the poll
  3. navigate to the autopilot
  4. open the console
  5. reload page
  6. Errors are thrown

Wanted behaviour:
the Errors in the console should be prevented

@Elblinator Elblinator added the bug label Jun 28, 2024
@Elblinator Elblinator added this to the 4.2 milestone Jun 28, 2024
@reiterl reiterl self-assigned this Jul 3, 2024
@reiterl
Copy link
Member

reiterl commented Jul 3, 2024

Mmh, I followed the steps. I tried a superuser and a meeting account. But I don't see the described errors or similar errors.

@reiterl reiterl assigned Elblinator and unassigned reiterl Jul 3, 2024
@bastianjoel
Copy link
Member

This is already fixed with #3796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants