1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-04 12:27:28 +02:00

db:jss: prettify

This commit is contained in:
Kushagra Gour
2018-01-21 17:44:18 +05:30
parent 80dabd446d
commit 5f37ffdf49

View File

@@ -106,7 +106,10 @@
async function getUser(userId) { async function getUser(userId) {
const remoteDb = await getDb(); const remoteDb = await getDb();
return remoteDb.doc(`users/${userId}`).get().then(doc => { return remoteDb
.doc(`users/${userId}`)
.get()
.then(doc => {
if (!doc.exists) if (!doc.exists)
return remoteDb.doc(`users/${userId}`).set({}, { merge: true }); return remoteDb.doc(`users/${userId}`).set({}, { merge: true });
const user = doc.data(); const user = doc.data();