From f897b1aff1c1cd4f90d43df5c7f20553b79eb3d5 Mon Sep 17 00:00:00 2001 From: Hesoyam <37535505+Scrip7@users.noreply.github.com> Date: Wed, 18 May 2022 04:15:11 +0430 Subject: [PATCH] docs(populate): find populate method should be awaited --- docs/populate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/populate.md b/docs/populate.md index a9663c3ebfb..501870aa69e 100644 --- a/docs/populate.md +++ b/docs/populate.md @@ -291,7 +291,7 @@ If you were to `populate()` using the `limit` option, you would find that the 2nd story has 0 fans: ```javascript -const stories = Story.find().populate({ +const stories = await Story.find().populate({ path: 'fans', options: { limit: 2 } });