Skip to content

Commit 031cd48

Browse files
authored
order_by.cc: Use IsKeyFieldPath() instead of == FieldPath::KeyFieldPath() (#9550)
1 parent 7a273e7 commit 031cd48

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Firestore/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
- [changed] Potentially fixed a crash during application exit caused by an
3+
assertion about ordering documents by missing fields (#9258).
24
- [changed] Add more details to the assertion failure in Query::Comparator() to
35
help with future debugging (#9258).
46

Firestore/core/src/core/order_by.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void AssertBothOptionalsHaveValues(
6767
ComparisonResult OrderBy::Compare(const Document& lhs,
6868
const Document& rhs) const {
6969
ComparisonResult result;
70-
if (field_ == FieldPath::KeyFieldPath()) {
70+
if (field_.IsKeyFieldPath()) {
7171
result = lhs->key().CompareTo(rhs->key());
7272
} else {
7373
absl::optional<google_firestore_v1_Value> value1 = lhs->field(field_);

0 commit comments

Comments
 (0)