Skip to content

chore(): Shoring up @Optional types #2014

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

Merged
merged 2 commits into from
Mar 9, 2019
Merged

Conversation

jamesdaniels
Copy link
Member

Checklist

  • Issue number for this PR: #nnn (required)
  • Docs included?: (yes/no; required for all API/functional changes)
  • Test units included?: (yes/no; required)
  • In a clean directory, yarn install, yarn test run successfully? (yes/no; required)

Description

@Optional() injections are actually passed through as null (rather than undefined, if not present), this has lead to a couple bugs in the past. Just shoring all these up to avoid similar mistakes in the future.

Code sample

No API change.

@jamesdaniels jamesdaniels added this to the 5.2.0 milestone Feb 22, 2019
@jamesdaniels jamesdaniels assigned davideast and unassigned davideast Feb 23, 2019
@jamesdaniels
Copy link
Member Author

@davideast Ready for review. Don't merge, if approved; as I'm targeting this for the 5.2 release.

Copy link
Collaborator

@davideast davideast left a comment

Choose a reason for hiding this comment

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

LGTM

@davideast davideast merged commit 587bf25 into master Mar 9, 2019
@davideast davideast deleted the shoring_up_optional_types branch March 9, 2019 17:20
peterennis added a commit to peterennis/angularfire2 that referenced this pull request Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants