Skip to content

Commit

Permalink
Handle ro results
Browse files Browse the repository at this point in the history
  • Loading branch information
DaddyWarbucks committed Oct 10, 2024
1 parent 927f357 commit ab9985c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/mongodb/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ export class MongoDbAdapter<
}
}
const [result] = await this.aggregateRaw(aggregateParams).then((result) => result.toArray())
if (!result) {
return 0
}
return result.total
}

Expand Down

0 comments on commit ab9985c

Please sign in to comment.