-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fixed accessing DataSnapshot with multiple paths #113
base: master
Are you sure you want to change the base?
Conversation
881ba39
to
fb7ef54
Compare
I've fixed issue with accessing child data with number paths (for array indexes), including failing test case. |
9eb10b9
to
f596a86
Compare
Hi @rhodgkins, thanks for the contribution. As you may have guessed, this repo is no longer used (see #160), but work is continuing on my fork for now, and we will be making a release in early December. I've opened a new PR with these changes. (Also, if you still happen to depend on |
The sister PR has now been merged. Look for a release soon. Thanks again. |
With this following data snapshot:
Calling
snapshot.child('foo/bar').val()
should beval
- but as.child
(and also.hasChild
) just checksthis._snapshotdata
for thekey
without splitting it by/
it returnsnull
. Includes tests.Also it would be useful to have this available so code that interacts with DataSnapshots directly (it might merge various snapshots into a single object, etc.) can be tested, so I've exported snapshot.js as
DataSnapshot
.Finally I've also added node 8 to the travis test matrix - hope this is ok!