We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87e0b06 commit 0d068f5Copy full SHA for 0d068f5
packages/firestore/src/local/memory_mutation_queue.ts
@@ -263,9 +263,10 @@ export class MemoryMutationQueue implements MutationQueue {
263
const start = new DocReference(documentKey, 0);
264
const end = new DocReference(documentKey, Number.POSITIVE_INFINITY);
265
this.batchesByDocumentKey.forEachInRange([start, end], ref => {
266
- if (!documentKey.isEqual(ref.key)) {
267
- return;
268
- }
+ assert(
+ documentKey.isEqual(ref.key),
+ "For each key, should only iterate over a single key's batches"
269
+ );
270
271
uniqueBatchIDs = uniqueBatchIDs.add(ref.targetOrBatchId);
272
});
0 commit comments