Skip to content

Commit 43b1b40

Browse files
committed
fix ref set
1 parent c708cd6 commit 43b1b40

File tree

1 file changed

+2
-2
lines changed
  • Node/quickstarts/firestore-sync-auth/functions

1 file changed

+2
-2
lines changed

Node/quickstarts/firestore-sync-auth/functions/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ exports.verifyComment = onDocumentWrittenWithAuthContext(
4848
}
4949

5050
// add auth medadata to the document
51-
return data.after.ref.set(
51+
return snapshot.ref.set(
5252
{
53-
created_by: authId,
53+
created_by: authId ?? "undefined",
5454
verified,
5555
},
5656
{merge: true},

0 commit comments

Comments
 (0)