Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmidt-sebastian/402b0eddd96efd3267632220673fc89b to your computer and use it in GitHub Desktop.
Save schmidt-sebastian/402b0eddd96efd3267632220673fc89b to your computer and use it in GitHub Desktop.
const doc = firestore('doc/a');
runTransaction(await t => {
t.get();
// Note: This is bad practice, but here we update `doc` inside of the transaciton
// but not using the transaction API. This update will fail with ABORTED.
await doc.set({});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment