From b82aa37566b2908d0b4c52dfb4891675c6c10f36 Mon Sep 17 00:00:00 2001 From: gfrancz <52467377+gfrancz@users.noreply.github.com> Date: Wed, 28 Jul 2021 14:39:18 -0700 Subject: [PATCH] Update depopulate documentation for document.js Currently the documentation indicates that if a path for depopulate(path) is not provided, then it's a no-op. This is absolutely not true -- in fact, all fields are depopulated. This change fixes the documentation issue. --- lib/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document.js b/lib/document.js index 9172018ae51..ef31c2e5288 100644 --- a/lib/document.js +++ b/lib/document.js @@ -4146,7 +4146,7 @@ Document.prototype.populated = function(path, val, options) { * console.log(doc.author); // '5144cf8050f071d979c118a7' * }) * - * If the path was not populated, this is a no-op. + * If the path was not provided, then all populated fields are returned to their unpopulated state. * * @param {String} path * @return {Document} this