Skip to content

Commit

Permalink
Merge pull request #8089 from felipeplets/patch-1
Browse files Browse the repository at this point in the history
Fix issue when using find in a collection with nested schema array
  • Loading branch information
vkarpov15 committed Aug 21, 2019
2 parents 3847007 + ad0666b commit a6d1e7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers/schematype/handleImmutable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ module.exports = function(schematype) {

function createImmutableSetter(path) {
return function immutableSetter(v) {
if (this.$__ == null) {
if (this == null || this.$__ == null) {
return v;
}
if (this.isNew) {
return v;
}
return this[path];
};
}
}

0 comments on commit a6d1e7a

Please sign in to comment.