Skip to content

Commit

Permalink
Merge pull request #8070 from rich-earth/master
Browse files Browse the repository at this point in the history
Update handleImmutable.js
  • Loading branch information
vkarpov15 authored Aug 18, 2019
2 parents d0fba5e + 813a8d2 commit cbdadf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers/query/handleImmutable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const StrictModeError = require('../../error/strict');

module.exports = function handleImmutable(schematype, strict, obj, key, fullPath) {
if (schematype == null || !schematype.options.immutable) {
if (!schematype || !schematype.options || !schematype.options.immutable) {
return false;
}
if (strict === false) {
Expand All @@ -15,4 +15,4 @@ module.exports = function handleImmutable(schematype, strict, obj, key, fullPath
}
delete obj[key];
return true;
};
};

0 comments on commit cbdadf2

Please sign in to comment.