Comparing version 7.6.13 to 7.7.0
@@ -11,2 +11,3 @@ 'use strict'; | ||
const cast$expr = require('./helpers/query/cast$expr'); | ||
const castString = require('./cast/string'); | ||
const castTextSearch = require('./schema/operators/text'); | ||
@@ -99,2 +100,5 @@ const get = require('./helpers/get'); | ||
val = castTextSearch(val, path); | ||
} else if (path === '$comment' && !schema.paths.hasOwnProperty('$comment')) { | ||
val = castString(val, path); | ||
obj[path] = val; | ||
} else { | ||
@@ -101,0 +105,0 @@ if (!schema) { |
@@ -18,3 +18,3 @@ 'use strict'; | ||
module.exports = function(val, path) { | ||
module.exports = function castTextSearch(val, path) { | ||
if (val == null || typeof val !== 'object') { | ||
@@ -21,0 +21,0 @@ throw new CastError('$text', val, path); |
{ | ||
"name": "mongoose", | ||
"description": "Mongoose MongoDB ODM", | ||
"version": "7.6.13", | ||
"version": "7.7.0", | ||
"author": "Guillermo Rauch <guillermo@learnboost.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2618171
49656