[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use async/await in Firestore snippets #121

Merged
merged 3 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use async/await in Firestore snippets
  • Loading branch information
samtstern committed Jun 24, 2020
commit fc1d7340d1f92ea776cac2de8d5bb5c7b24fed9b
4 changes: 3 additions & 1 deletion firestore/extend-with-functions/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ function writingData() {

// We'll only update if the name has changed.
// This is crucial to prevent infinite loops.
if (data.name == previousData.name) return null;
if (data.name == previousData.name) {
return null;
}

// Retrieve the current count of name changes
let count = data.name_change_count;
Expand Down
Loading