Skip to content

Commit 1aeb0ae

Browse files
authored
Use async/await in Firestore snippets (#121)
1 parent bac7d7f commit 1aeb0ae

File tree

4 files changed

+389
-523
lines changed

4 files changed

+389
-523
lines changed

firestore/extend-with-functions/functions/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ function writingData() {
115115

116116
// We'll only update if the name has changed.
117117
// This is crucial to prevent infinite loops.
118-
if (data.name == previousData.name) return null;
118+
if (data.name == previousData.name) {
119+
return null;
120+
}
119121

120122
// Retrieve the current count of name changes
121123
let count = data.name_change_count;

0 commit comments

Comments
 (0)