mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 06:35:47 +00:00
Fix custom mongoose query .toObject() is undefined
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
This commit is contained in:
parent
dcf93f7295
commit
18a02baf77
@ -368,7 +368,7 @@ const result = strapi.query('restaurant').model.find({
|
||||
date: { $gte: '2019-01-01T00.00.00Z' },
|
||||
});
|
||||
|
||||
const fields = result.toObject();
|
||||
const fields = result.map(entry => entry.toObject());
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user