Skip to content

Commit 96aed4d

Browse files
committed
address comments and fixing nits
1 parent a6b40ba commit 96aed4d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/firestore/src/local/local_documents_view.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ export class LocalDocumentsView {
231231
let missingBaseDocEntriesForPatching = documentKeySet();
232232
for (const batch of matchingMutationBatches) {
233233
for (const mutation of batch.mutations) {
234-
const key = mutation.key;
235234
// Only process documents belonging to the collection.
236-
if (!query.path.isImmediateParentOf(key.path)) {
235+
if (!query.path.isImmediateParentOf(mutation.key.path)) {
237236
continue;
238237
}
239238
if (
@@ -251,8 +250,8 @@ export class LocalDocumentsView {
251250
missingBaseDocEntriesForPatching
252251
);
253252
})
254-
.next(baseDocsForPatching => {
255-
baseDocsForPatching.forEach((key, doc) => {
253+
.next(docsWithPendingPatches => {
254+
docsWithPendingPatches.forEach((key, doc) => {
256255
if (doc !== null && doc instanceof Document) {
257256
results = results.insert(key, doc);
258257
}

0 commit comments

Comments
 (0)