Skip to content

Commit

Permalink
Merge pull request #12470 from hasezoey/addNamesToPlugins
Browse files Browse the repository at this point in the history
style: add names to previously anonymous plugin functions
  • Loading branch information
AbdelrahmanHafez committed Sep 26, 2022
2 parents f50ec33 + d08cd47 commit a792dc3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/removeSubdocs.js
Expand Up @@ -6,7 +6,7 @@ const each = require('../helpers/each');
* ignore
*/

module.exports = function(schema) {
module.exports = function removeSubdocs(schema) {
const unshift = true;
schema.s.hooks.pre('remove', false, function(next) {
if (this.$isSubdocument) {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/saveSubdocs.js
Expand Up @@ -6,7 +6,7 @@ const each = require('../helpers/each');
* ignore
*/

module.exports = function(schema) {
module.exports = function saveSubdocs(schema) {
const unshift = true;
schema.s.hooks.pre('save', false, function(next) {
if (this.$isSubdocument) {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/validateBeforeSave.js
Expand Up @@ -4,7 +4,7 @@
* ignore
*/

module.exports = function(schema) {
module.exports = function validateBeforeSave(schema) {
const unshift = true;
schema.pre('save', false, function validateBeforeSave(next, options) {
const _this = this;
Expand Down

0 comments on commit a792dc3

Please sign in to comment.