diff --git a/packages/firestore/src/core/query.ts b/packages/firestore/src/core/query.ts index 8681336009b..2b7e19e81d4 100644 --- a/packages/firestore/src/core/query.ts +++ b/packages/firestore/src/core/query.ts @@ -533,18 +533,18 @@ export class RelationFilter extends Filter { } } - private matchesValue(value: FieldValue): boolean { + private matchesValue(other: FieldValue): boolean { if (this.op === RelationOp.ARRAY_CONTAINS) { return ( - value instanceof ArrayValue && - value.internalValue.find(element => element.isEqual(this.value)) !== + other instanceof ArrayValue && + other.internalValue.find(element => element.isEqual(this.value)) !== undefined ); } else { // Only compare types with matching backend order (such as double and int). return ( - this.value.typeOrder === value.typeOrder && - this.matchesComparison(value.compareTo(this.value)) + this.value.typeOrder === other.typeOrder && + this.matchesComparison(other.compareTo(this.value)) ); } }