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 null ref exception in Context Data #2287

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

Migaroez
Copy link
Contributor

@Migaroez Migaroez commented Sep 13, 2024

Description

Fixes a simple nullcheck when the code determines a certain item in an array is an object but the value of the reference is null

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Motivation and context

I was testing out the debugElement inside a user profile app and noticed it wasn't showing the console error directed me to the line and showed the missing truthy check.

The routerContext router value was null and thus threw and error when the system tried to figure out if type was an observable

Copy link

sonarcloud bot commented Sep 13, 2024

Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

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

Great

@nielslyngsoe nielslyngsoe merged commit a95086b into main Sep 13, 2024
9 checks passed
@nielslyngsoe nielslyngsoe deleted the v14/bugfix/context-data-null-ref branch September 13, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants