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]: valueChanges should return Observable<T|null> #1321

Merged
merged 4 commits into from
Jan 23, 2018

Conversation

timblakely
Copy link
Contributor

Fix for #1319.

Also cleaning up trailing whitespace (let me know if you prefer to keep it and I'll update the PR).

return this.snapshotChanges().map(action => {
return (action.payload.exists ? action.payload.data() : null) as T;
return action.payload.exists ? action.payload.data() : null;
Copy link
Member

Choose a reason for hiding this comment

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

should this be ? action.payload.data() as T : null?

@jamesdaniels
Copy link
Member

Whitespace is fine. Test is red though, see also comment.

@jamesdaniels jamesdaniels merged commit aadc71a into angular:master Jan 23, 2018
myspivey pushed a commit to myspivey/angularfire2 that referenced this pull request Apr 10, 2018
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