Skip to content

Commit

Permalink
Merge pull request #14172 from rohanricky/array_null_check
Browse files Browse the repository at this point in the history
null check
  • Loading branch information
vkarpov15 authored Dec 13, 2023
2 parents 6760c54 + 637b63e commit 6d25679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ Document.prototype.$__set = function(pathToMark, path, options, constructing, pa
val[arrayAtomicsSymbol] = priorVal[arrayAtomicsSymbol];
val[arrayAtomicsBackupSymbol] = priorVal[arrayAtomicsBackupSymbol];
if (utils.isMongooseDocumentArray(val)) {
val.forEach(doc => { doc.isNew = false; });
val.forEach(doc => { doc && (doc.isNew = false); });
}
}

Expand Down

0 comments on commit 6d25679

Please sign in to comment.