@@ -244,27 +244,25 @@ export class IndexedDbMutationQueue implements MutationQueue {
244
244
transaction : PersistenceTransaction ,
245
245
batchId : BatchId
246
246
) : PersistencePromise < MutationBatch | null > {
247
- return this . getMutationQueueMetadata ( transaction ) . next ( metadata => {
248
- const nextBatchId = batchId + 1 ;
249
-
250
- const range = IDBKeyRange . lowerBound ( [ this . userId , nextBatchId ] ) ;
251
- let foundBatch : MutationBatch | null = null ;
252
- return mutationsStore ( transaction )
253
- . iterate (
254
- { index : DbMutationBatch . userMutationsIndex , range } ,
255
- ( key , dbBatch , control ) => {
256
- if ( dbBatch . userId === this . userId ) {
257
- assert (
258
- dbBatch . batchId >= nextBatchId ,
259
- 'Should have found mutation after ' + nextBatchId
260
- ) ;
261
- foundBatch = this . serializer . fromDbMutationBatch ( dbBatch ) ;
262
- }
263
- control . done ( ) ;
247
+ const nextBatchId = batchId + 1 ;
248
+
249
+ const range = IDBKeyRange . lowerBound ( [ this . userId , nextBatchId ] ) ;
250
+ let foundBatch : MutationBatch | null = null ;
251
+ return mutationsStore ( transaction )
252
+ . iterate (
253
+ { index : DbMutationBatch . userMutationsIndex , range } ,
254
+ ( key , dbBatch , control ) => {
255
+ if ( dbBatch . userId === this . userId ) {
256
+ assert (
257
+ dbBatch . batchId >= nextBatchId ,
258
+ 'Should have found mutation after ' + nextBatchId
259
+ ) ;
260
+ foundBatch = this . serializer . fromDbMutationBatch ( dbBatch ) ;
264
261
}
265
- )
266
- . next ( ( ) => foundBatch ) ;
267
- } ) ;
262
+ control . done ( ) ;
263
+ }
264
+ )
265
+ . next ( ( ) => foundBatch ) ;
268
266
}
269
267
270
268
getAllMutationBatches (
0 commit comments