Skip to content

Commit

Permalink
Update depopulate documentation for document.js
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gfrancz authored Jul 28, 2021
1 parent 6b33a7b commit b82aa37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b82aa37

Please sign in to comment.