Skip to content

Commit c5dc226

Browse files
requested changes 4 cont.
1 parent 7c6ff5c commit c5dc226

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

lib/schema/int32.js

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -194,55 +194,6 @@ SchemaInt32.prototype.cast = function(value) {
194194
}
195195
};
196196

197-
/*!
198-
* ignore
199-
*/
200-
201-
SchemaInt32.$conditionalHandlers = {
202-
...SchemaType.prototype.$conditionalHandlers,
203-
$gt: handleSingle,
204-
$gte: handleSingle,
205-
$lt: handleSingle,
206-
$lte: handleSingle
207-
};
208-
209-
/*!
210-
* ignore
211-
*/
212-
213-
function handleSingle(val, context) {
214-
return this.castForQuery(null, val, context);
215-
}
216-
217-
/**
218-
* Casts contents for queries.
219-
*
220-
* @param {String} $conditional
221-
* @param {any} val
222-
* @api private
223-
*/
224-
225-
SchemaInt32.prototype.castForQuery = function($conditional, val, context) {
226-
let handler;
227-
if ($conditional != null) {
228-
handler = SchemaInt32.$conditionalHandlers[$conditional];
229-
230-
if (handler) {
231-
return handler.call(this, val);
232-
}
233-
234-
return this.applySetters(null, val, context);
235-
}
236-
237-
try {
238-
return this.applySetters(val, context);
239-
} catch (err) {
240-
if (err instanceof CastError && err.path === this.path && this.$fullPath != null) {
241-
err.path = this.$fullPath;
242-
}
243-
throw err;
244-
}
245-
};
246197

247198
/*!
248199
* Module exports.

0 commit comments

Comments
 (0)