Skip to content

Commit

Permalink
Merge pull request #5845 from Michael77/master
Browse files Browse the repository at this point in the history
fix "TypeError: Cannot read property 'options' of undefined" error th…
  • Loading branch information
vkarpov15 authored Nov 23, 2017
2 parents d5d7c1e + 1ffc38d commit dc19eac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/query/castUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function walkUpdatePath(schema, obj, op, strict, context, pref) {
*/

function _handleCastError(error, query, key, aggregatedError) {
if (!query.options.multipleCastError) {
if (typeof query !== 'object' || !query.options.multipleCastError) {
throw error;
}
aggregatedError.addError(key, error);
Expand Down

0 comments on commit dc19eac

Please sign in to comment.