Skip to content

Commit

Permalink
fix example typo for Schema.prototype.plugin()
Browse files Browse the repository at this point in the history
  • Loading branch information
anaetrezve committed Sep 18, 2019
1 parent 97c8114 commit d9c91cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ Schema.prototype.post = function(name) {
*
* const s = new Schema({ name: String });
* s.plugin(schema => console.log(schema.path('name').path));
* mongoose.model('Test', schema); // Prints 'name'
* mongoose.model('Test', s); // Prints 'name'
*
* @param {Function} plugin callback
* @param {Object} [opts]
Expand Down

0 comments on commit d9c91cb

Please sign in to comment.