Skip to content

Conversation

@illuminist
Copy link
Contributor

@illuminist illuminist commented Feb 26, 2020

Description

I understand that populate was designed for RTDB where it doesn't actually have list type for an array, thus when using with firestore list type(array), it outputs an object with index as a key instead of an actual array. So this little change fixes populate to be able to handle firestore list and it will output an array instead of plain object.

Check List

If not relevant to pull request, check off as complete

  • All tests passing
  • Docs updated with any changes or examples if applicable
  • Added tests to ensure new feature(s) work properly

Relevant Issues

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #871 into master will increase coverage by 3.53%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #871      +/-   ##
==========================================
+ Coverage   85.24%   88.77%   +3.53%     
==========================================
  Files          29       29              
  Lines         759      784      +25     
==========================================
+ Hits          647      696      +49     
+ Misses        112       88      -24

@prescottprue
Copy link
Owner

Amazing find! You are right that it was originally for RTDB, but glad to have it also correctly handle Firestore

@prescottprue prescottprue changed the base branch from master to v3.1.2 February 26, 2020 21:09
@prescottprue prescottprue changed the title Fix populate to handle firestore list type fix(populate): handle firestore list type in populate Feb 26, 2020
@prescottprue prescottprue merged commit 6afdd83 into prescottprue:v3.1.2 Feb 26, 2020
@prescottprue prescottprue mentioned this pull request Feb 26, 2020
3 tasks
prescottprue added a commit that referenced this pull request Feb 27, 2020
* fix(types): add types for `onAttemptCollectionDelete` to fix `implicit any` error (#870) - @macinjoke
* fix(populate): handle firestore list type in populate (#871) - @illuminist
* fix(types): add missing `onAuthStateChanged` for config object - @illuminist
* fix(types): relax typing for `UserProfile` to be generic object - @illuminist
* fix(types): make Schema the second generic parameter (#826)
* chore(docs): add a typescript page to the recipes section of the docs (explains passing schema to reducer)

Co-authored-by: illuminist <[email protected]>
Co-authored-by: macinjoke <[email protected]>
Co-authored-by: Marko Elez <[email protected]>
Co-authored-by: Chris Dzoba <[email protected]>
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