File tree 1 file changed +7
-6
lines changed
packages/firestore/src/local 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -484,11 +484,12 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
484
484
. loadAll ( )
485
485
. next ( queues => {
486
486
for ( const queue of queues ) {
487
- userIds = userIds . add ( queue . userId ) ;
488
- }
489
- } )
490
- . next ( ( ) => {
491
- userIds . forEach ( userId => {
487
+ const userId = queue . userId ;
488
+ if ( userIds . has ( userId ) ) {
489
+ // We have already processed this user.
490
+ continue ;
491
+ }
492
+ userIds = userIds . add ( userId ) ;
492
493
const user = new User ( userId ) ;
493
494
const remoteDocumentCache = newIndexedDbRemoteDocumentCache (
494
495
this . serializer
@@ -549,7 +550,7 @@ export class SchemaConverter implements SimpleDbSchemaConverter {
549
550
) ;
550
551
} )
551
552
) ;
552
- } ) ;
553
+ }
553
554
} )
554
555
. next ( ( ) => PersistencePromise . waitFor ( promises ) ) ;
555
556
}
You can’t perform that action at this time.
0 commit comments