Skip to content

Commit

Permalink
fix(document): add parent() function to subdocument to match array su…
Browse files Browse the repository at this point in the history
…bdoc

Fix #5134
  • Loading branch information
vkarpov15 committed Apr 18, 2017
1 parent 68d8d15 commit 551c0a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/types/subdocument.js
Expand Up @@ -102,6 +102,16 @@ Subdocument.prototype.ownerDocument = function() {
return this.$__.ownerDocument;
};

/**
* Returns this sub-documents parent document.
*
* @api public
*/

Subdocument.prototype.parent = function() {
return this.$parent;
};

/**
* Null-out this subdoc
*
Expand Down

0 comments on commit 551c0a7

Please sign in to comment.