Skip to content

Commit e48a146

Browse files
authored
Update transaction_promise.js (firebase#198)
1 parent 4e2e1a2 commit e48a146

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

firestore-next/test.firestore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ describe("firestore", () => {
559559
const newPop = sfDoc.data().population + 1;
560560
if (newPop <= 1000000) {
561561
transaction.update(sfDocRef, { population: newPop });
562+
return newPop;
562563
} else {
563564
return Promise.reject("Sorry! Population is too big");
564565
}

snippets/firestore-next/test-firestore/transaction_promise.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ try {
1919
const newPop = sfDoc.data().population + 1;
2020
if (newPop <= 1000000) {
2121
transaction.update(sfDocRef, { population: newPop });
22+
return newPop;
2223
} else {
2324
return Promise.reject("Sorry! Population is too big");
2425
}

0 commit comments

Comments
 (0)