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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user