Skip to content

Commit

Permalink
Merge pull request #9185 from joaoritter/master
Browse files Browse the repository at this point in the history
Update schema.js
  • Loading branch information
vkarpov15 committed Jul 1, 2020
2 parents 316f922 + f888f4c commit 6fe937f
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 @@ -509,7 +509,7 @@ Schema.prototype.add = function add(obj, prefix) {
// Propage `typePojoToMixed` to implicitly created schemas
const opts = { typePojoToMixed: false };
const _schema = new Schema(obj[key][this.options.typeKey], opts);
const schemaWrappedPath = Object.assign({}, obj[key], { type: _schema });
const schemaWrappedPath = Object.assign({}, obj[key], { [this.options.typeKey]: _schema });
this.path(prefix + key, schemaWrappedPath);
} else {
// Either the type is non-POJO or we interpret it as Mixed anyway
Expand Down

0 comments on commit 6fe937f

Please sign in to comment.