Skip to content

Commit

Permalink
Merge pull request #8175 from anaethoss/patch-1
Browse files Browse the repository at this point in the history
fix example typo for Schema.prototype.plugin()
  • Loading branch information
vkarpov15 committed Sep 19, 2019
2 parents 97c8114 + d9c91cb commit f3ed313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schema.js
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 f3ed313

Please sign in to comment.