1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-02 11:30:22 +02:00

return the doc promise

This commit is contained in:
Kushagra Gour
2024-06-20 19:20:52 +05:30
parent b9fbccf513
commit c2420cccd9

View File

@@ -125,7 +125,7 @@ function getArrayFromQuerySnapshot(querySnapshot) {
} }
async function fetchItem(itemId) { async function fetchItem(itemId) {
getDoc(doc(db, `items/${itemId}`)).then(doc => { return getDoc(doc(db, `items/${itemId}`)).then(doc => {
if (!doc.exists) return {}; if (!doc.exists) return {};
const data = doc.data(); const data = doc.data();
return data; return data;