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

Check for undefined and null in typeguards #227

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Conversation

NSeydoux
Copy link
Contributor

The hasErrorResponse and hasProblemDetails type guard didn't check for null or undefined, making it possible to get a runtime error.

  • I've added a unit test to test for potential regressions of this bug.
  • The changelog has been updated, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

The `hasErrorResponse` and `hasProblemDetails` type guard didn't check
for null or undefined, making it possible to get a runtime error.
@NSeydoux NSeydoux requested a review from a team as a code owner August 23, 2024 08:21
Copy link
Contributor

@edwardsph edwardsph left a comment

Choose a reason for hiding this comment

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

LGTM other than lint issues - it seems your IDE and the linter are in conflict

@NSeydoux
Copy link
Contributor Author

Interesting, it looks like I was running an older version of prettier.

@NSeydoux NSeydoux enabled auto-merge (squash) August 23, 2024 09:04
@NSeydoux NSeydoux merged commit 933e111 into main Aug 23, 2024
16 checks passed
@NSeydoux NSeydoux deleted the fix/null-type-guards branch August 23, 2024 09:04
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.

2 participants