Skip to content

Commit 2ddc068

Browse files
committed
Corrected the implementation and documentation of
1 parent 66b16cb commit 2ddc068

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/firestore/src/core/target.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,17 @@ export class CompositeFilter extends Filter {
786786
}
787787
}
788788

789-
// TODO(orquery) move compositeFilterWithAddedFilters to filter.ts in future refactor
789+
/**
790+
* Returns a new composite filter that contains all filter from
791+
* `compositeFilter` plus all the given filters in `otherFilters`.
792+
* TODO(orquery) move compositeFilterWithAddedFilters to filter.ts in future refactor
793+
*/
790794
export function compositeFilterWithAddedFilters(
791795
compositeFilter: CompositeFilter,
792796
otherFilters: Filter[]
793797
): CompositeFilter {
794798
const mergedFilters = compositeFilter.filters.concat(otherFilters);
795-
return CompositeFilter.create(mergedFilters, CompositeOperator.AND);
799+
return CompositeFilter.create(mergedFilters, compositeFilter.op);
796800
}
797801

798802
export function compositeFilterIsConjunction(

0 commit comments

Comments
 (0)