Skip to content

Commit

Permalink
Fixes the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Sep 23, 2019
1 parent 1a01713 commit c76e062
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/helpers/common.js
Expand Up @@ -33,7 +33,7 @@ function flatten(update, path, options, schema) {
result[path + key] = val;

// Avoid going into mixed paths if schema is specified
const keySchema = schema && schema.path(path + key);
const keySchema = schema && schema.path && schema.path(path + key);
if (keySchema && keySchema.instance === 'Mixed') continue;

if (shouldFlatten(val)) {
Expand Down
1 change: 0 additions & 1 deletion lib/helpers/updateValidators.js
Expand Up @@ -4,7 +4,6 @@
* Module dependencies.
*/

const Mixed = require('../schema/mixed');
const ValidationError = require('../error/validation');
const cleanPositionalOperators = require('./schema/cleanPositionalOperators');
const flatten = require('./common').flatten;
Expand Down

0 comments on commit c76e062

Please sign in to comment.