prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 556 forks source link

fix(populate): handle firestore list type in populate #871

Closed illuminist closed 4 years ago

illuminist commented 4 years ago

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

Relevant Issues

codecov[bot] commented 4 years ago

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 commented 4 years ago

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