Skip to content

Commit

Permalink
fix "TypeError: Cannot read property 'options' of undefined" error th…
Browse files Browse the repository at this point in the history
…at stops actual error from being thrown
  • Loading branch information
milne-dev committed Nov 22, 2017
1 parent 82c615c commit 1ffc38d
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 1ffc38d

Please sign in to comment.