File tree 3 files changed +5
-11
lines changed 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -333,8 +333,6 @@ export function targetGetLowerBound(
333
333
filterValue = MIN_VALUE ;
334
334
break ;
335
335
case Operator . NOT_IN :
336
- // Porting Note: The Web SDK implements notIn queries differently from
337
- // Android and only uses a single element array as a notIn bound.
338
336
filterValue = {
339
337
arrayValue : { values : [ MIN_VALUE ] }
340
338
} ;
@@ -419,8 +417,6 @@ export function targetGetUpperBound(
419
417
filterValue = MAX_VALUE ;
420
418
break ;
421
419
case Operator . NOT_IN :
422
- // Porting Note: The Web SDK implements notIn queries differently from
423
- // Android and only uses a single element array as a notIn bound.
424
420
filterValue = {
425
421
arrayValue : { values : [ MAX_VALUE ] }
426
422
} ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export interface IndexManager {
103
103
104
104
/**
105
105
* Returns the documents that match the given target based on the provided
106
- * index. Returns `null` if the target does not have a matching index.
106
+ * index or `null` if the target does not have a matching index.
107
107
*/
108
108
getDocumentsMatchingTarget (
109
109
transaction : PersistenceTransaction ,
Original file line number Diff line number Diff line change @@ -426,13 +426,10 @@ export class IndexedDbIndexManager implements IndexManager {
426
426
const matchingIndexes = indexes . filter ( i =>
427
427
targetIndexMatcher . servedByIndex ( i )
428
428
) ;
429
- if ( matchingIndexes . length === 0 ) {
430
- return null ;
431
- }
432
429
433
430
// Return the index that matches the most number of segments.
434
431
matchingIndexes . sort ( ( l , r ) => r . fields . length - l . fields . length ) ;
435
- return matchingIndexes [ 0 ] ;
432
+ return matchingIndexes . length > 0 ? matchingIndexes [ 0 ] : null ;
436
433
} ) ;
437
434
}
438
435
@@ -642,8 +639,9 @@ export class IndexedDbIndexManager implements IndexManager {
642
639
) : PersistencePromise < void > {
643
640
// Porting Note: `getFieldIndexes()` on Web does not cache index lookups as
644
641
// it could be used across different IndexedDB transactions. As any cached
645
- // data might invalidated by other multi-tab clients, we can only trust data
646
- // within a single IndexedDB transaction. We therefore add a cache here.
642
+ // data might be invalidated by other multi-tab clients, we can only trust
643
+ // data within a single IndexedDB transaction. We therefore add a cache
644
+ // here.
647
645
const memoizedIndexes = new Map < string , FieldIndex [ ] > ( ) ;
648
646
return PersistencePromise . forEach ( documents , ( key , doc ) => {
649
647
const memoizedCollectionIndexes = memoizedIndexes . get (
You can’t perform that action at this time.
0 commit comments