From d9c91cb89eb7ed1b436d8c72ac983368f9e50660 Mon Sep 17 00:00:00 2001 From: Anaet Hossain Rezve Date: Wed, 18 Sep 2019 15:49:57 +0600 Subject: [PATCH] fix example typo for Schema.prototype.plugin() --- lib/schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/schema.js b/lib/schema.js index 249d8acee25..b3670d97b8b 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -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]