- Notifications
You must be signed in to change notification settings - Fork 218
Correct the argument types of the forEach function #13
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
Changes from 2 commits
f3afac4 b2b0b41 a110af0 640466b File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -206,11 +206,10 @@ export class DeltaSnapshot implements firebase.database.DataSnapshot { | |
| return valAt(this._delta, this._childPath) !== undefined; | ||
| } | ||
| | ||
| // TODO(inlined) what is this boolean for? | ||
| forEach(action: (a: DeltaSnapshot) => boolean): boolean { | ||
| let val = this.val(); | ||
| if (_.isPlainObject(val)) { | ||
| _.keys(val).forEach(key => action(this.child(key))); | ||
| return _.keys(val).some(key => action(this.child(key))); | ||
| ||
| } | ||
| return false; | ||
| } | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some checks here that the return values of both
forEach()calls in this test arefalse?