Skip to content

Commit

Permalink
clean build
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlux committed May 30, 2024
1 parent 015354b commit f90d333
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dist/RequestValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,17 @@ function checkSchema(a) {
},
getSearchableFieldsOfTypeString(b) {
var c = b.filter(function (b) {
var c = a.path(b) instanceof mongoose.Schema.Types.String;
return c || void 0, c;
var c = a.path(b);
if (c instanceof mongoose.Schema.Types.String) return !0;
var d = c instanceof mongoose.Schema.Types.Array,
e = c.caster && c.caster instanceof mongoose.Schema.Types.String;
return (
!!(d && e) ||
(console.warn(
`schema.path(${b}) is not of type String or String[] - searchableField ${b} has been removed`
),
!1)
);
});
return c;
},
Expand Down

0 comments on commit f90d333

Please sign in to comment.