Skip to content

Commit 1a0cce3

Browse files
committed
Update aggregate.ts
1 parent c6df2c0 commit 1a0cce3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/firestore/src/lite-api/aggregate.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ export class AggregateQuery {
3333
readonly type = 'AggregateQuery';
3434
/**
3535
* The query on which you called `countQuery` in order to get this `AggregateQuery`.
36-
* Query type is set to unknown to avoid error caused by query type converter.
37-
* might change it back to T after testing if the error do exist or not
3836
*/
3937
readonly query: Query<unknown>;
4038

@@ -93,13 +91,9 @@ export function getAggregateFromServerDirect(
9391
.map(([key, value]) => userDataWriter.convertValue(value as Value));
9492

9593
const count = counts[0];
96-
hardAssert(
97-
count !== undefined,
98-
'count_alias property is missing from result.'
99-
);
10094
hardAssert(
10195
typeof count === 'number',
102-
'Count aggeragte field is not a number: ' + count
96+
'Count aggeragte field value is not a number: ' + count
10397
);
10498

10599
return Promise.resolve(new AggregateQuerySnapshot(query, count));

0 commit comments

Comments
 (0)