mirror of
https://github.com/chinchang/web-maker.git
synced 2025-04-22 11:44:28 +02:00
return the doc promise
This commit is contained in:
parent
b9fbccf513
commit
c2420cccd9
@ -125,7 +125,7 @@ function getArrayFromQuerySnapshot(querySnapshot) {
|
||||
}
|
||||
|
||||
async function fetchItem(itemId) {
|
||||
getDoc(doc(db, `items/${itemId}`)).then(doc => {
|
||||
return getDoc(doc(db, `items/${itemId}`)).then(doc => {
|
||||
if (!doc.exists) return {};
|
||||
const data = doc.data();
|
||||
return data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user