Open hallta opened 9 years ago
I removed the check for aggregates.length as:
aggregates.length
.length
Where, in the example:
db.aggregate({column: "value"}).groupBy('column');
Because there are no aggregates, the method would have originally thrown an exception. However, in this case, aggregates aren't needed (just the group by), where the check prevents the execution and the expected output of this "aggregate" function.
I removed the check for
aggregates.length
as:.length
of will simply skip the aggregatesWhere, in the example:
Because there are no aggregates, the method would have originally thrown an exception. However, in this case, aggregates aren't needed (just the group by), where the check prevents the execution and the expected output of this "aggregate" function.