Skip to content

Commit

Permalink
Add missing getters and setters copy when cloning (see issue #8111)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneDamon committed Sep 3, 2019
1 parent 03dfc6a commit 9b8b7b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/schematype.js
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,8 @@ SchemaType.prototype.clone = function() {
const schematype = new this.constructor(this.path, options, this.instance);
schematype.validators = this.validators.slice();
schematype.requiredValidator = this.requiredValidator;
schematype.getters = this.getters.slice();
schematype.setters = this.setters.slice();
return schematype;
};

Expand Down

0 comments on commit 9b8b7b3

Please sign in to comment.