Skip to content

Commit

Permalink
if our update schema path is a nested array do not skip query casting.
Browse files Browse the repository at this point in the history
  • Loading branch information
lineus committed Nov 1, 2018
1 parent 5d122e8 commit 64c6d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/query/castUpdate.js
Expand Up @@ -411,7 +411,7 @@ function castUpdateVal(schema, val, op, $conditional, context, path) {
return schema.castForQueryWrapper({
val: val,
context: context,
$skipQueryCastForUpdate: val != null && schema.$isMongooseArray
$skipQueryCastForUpdate: val != null && schema.$isMongooseArray && schema.$parentSchema
});
}

Expand Down

0 comments on commit 64c6d15

Please sign in to comment.