Skip to content

Commit c61aec2

Browse files
committed
Bug fix: forgot to take result of immutable set insertion.
1 parent 08eafdf commit c61aec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firestore/src/local/local_store_impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ function populateDocumentChangeBuffer(
684684
documents: MutableDocumentMap
685685
): PersistencePromise<DocumentChangeResult> {
686686
let updatedKeys = documentKeySet();
687-
const conditionChanged = documentKeySet();
687+
let conditionChanged = documentKeySet();
688688
documents.forEach(k => (updatedKeys = updatedKeys.add(k)));
689689
return documentBuffer.getEntries(txn, updatedKeys).next(existingDocs => {
690690
let changedDocs = mutableDocumentMap();
@@ -693,7 +693,7 @@ function populateDocumentChangeBuffer(
693693

694694
// Check if see if there is a existence state change for this document.
695695
if (doc.isFoundDocument() !== existingDoc.isFoundDocument()) {
696-
conditionChanged.add(key);
696+
conditionChanged = conditionChanged.add(key);
697697
}
698698

699699
// Note: The order of the steps below is important, since we want

0 commit comments

Comments
 (0)