From 90bec9ff1b7bf08138168f99f22977bbf8bf9b8d Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 6 Dec 2018 01:04:18 +0300 Subject: [PATCH] Update count on countDocuments --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8af68dd..077394e 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ function paginate(query, options, callback) { } promises = { docs: docsQuery.exec(), - count: this.count(query).exec() + count: this.countDocuments(query).exec() }; if (lean && leanWithId) { promises.docs = promises.docs.then((docs) => {