Skip to content

Commit

Permalink
Merge pull request #12429 from MartinDrost/master
Browse files Browse the repository at this point in the history
fix: allow null values inside $expr objects
  • Loading branch information
vkarpov15 committed Sep 14, 2022
2 parents 5f62e70 + d0bea58 commit c35dfdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers/query/cast$expr.js
Expand Up @@ -77,8 +77,8 @@ module.exports = function cast$expr(val, schema, strictQuery) {
};

function _castExpression(val, schema, strictQuery) {
if (isPath(val)) {
// Assume path
// Preserve the value if it represents a path or if it's null
if (isPath(val) || val === null) {
return val;
}

Expand Down

0 comments on commit c35dfdd

Please sign in to comment.