Skip to content

Commit 0d068f5

Browse files
committed
Review fix
1 parent 87e0b06 commit 0d068f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/firestore/src/local/memory_mutation_queue.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ export class MemoryMutationQueue implements MutationQueue {
263263
const start = new DocReference(documentKey, 0);
264264
const end = new DocReference(documentKey, Number.POSITIVE_INFINITY);
265265
this.batchesByDocumentKey.forEachInRange([start, end], ref => {
266-
if (!documentKey.isEqual(ref.key)) {
267-
return;
268-
}
266+
assert(
267+
documentKey.isEqual(ref.key),
268+
"For each key, should only iterate over a single key's batches"
269+
);
269270

270271
uniqueBatchIDs = uniqueBatchIDs.add(ref.targetOrBatchId);
271272
});

0 commit comments

Comments
 (0)