Hey,
I’m working on an ionic firebase application. And for that i have a service file for firebase to get data from different collections. It was working fine before. But now i’m getting a error
public getMyReviews(id): Promise {
return new Promise<any>((resolve, reject) => {
this.adb.collection('reviews', ref => ref.where('restId', '==', id)).get().subscribe(async (review) => {
let data = review.docs.map((element) => {
let item = element.data();
item.id = element.id;
item.uid.get().then(function (doc) {
item.uid = doc.data();
});
return item;
});
resolve(data);
}, error => {
reject(error);
});
});
}
The error is in the line item.id = element.id and item.uid.get(), the error says that cannot find item.id or item.uid. What is the problem? i don’t know what change made this error to come
1 post - 1 participant