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

Fixed failed render due to returning undefined rather than null #43505

Merged
merged 1 commit into from Nov 10, 2021

Conversation

jmkulwik
Copy link
Contributor

@jmkulwik jmkulwik commented Nov 10, 2021

In the case where no inline dropdown menu should render, such as when reviewing another student's code, the InlineDropdownMenu would return undefined rather than null. This caused the React Error https://reactjs.org/docs/error-decoder.html/?invariant=152&args[]=e to be thrown which translates to the following message:

e(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

This caused the parent elements to all unmount, causing a blank screen.

This was reported during a call with CSA pilot teachers.

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@jmkulwik jmkulwik requested a review from a team November 10, 2021 01:43
@jmkulwik jmkulwik merged commit be5c915 into staging Nov 10, 2021
@jmkulwik jmkulwik deleted the fix-code-review-issue branch November 10, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants