diff --git a/lib/error/cast.js b/lib/error/cast.js index f7df49b8c7e..115927117f7 100644 --- a/lib/error/cast.js +++ b/lib/error/cast.js @@ -75,7 +75,6 @@ class CastError extends MongooseError { * ignore */ setModel(model) { - this.model = model; this.message = formatMessage(model, this.kind, this.value, this.path, this.messageFormat, this.valueType); }