geofirex
geofirex copied to clipboard
Returning DocumentReference will be great
https://github.com/codediodeio/geofirex/blob/8dc13bfbc73d9a4d652b215bf4182b41994bb414/src/query.ts#L159
@codediodeio, It would be really great if the result document returns ref(DocumentReference) instead of id
function snapToData(id = 'id') {
return map((querySnapshot: fb.firestore.QuerySnapshot) =>
querySnapshot.docs.map(v => {
return {
ref: v.ref, //lets return document.ref ...(id ? { [id]: v.id } : null),
...v.data()
};
})
);
}
Thanks