Cleanup
This commit is contained in:
8
node_modules/mongoose/lib/error/validator.js
generated
vendored
8
node_modules/mongoose/lib/error/validator.js
generated
vendored
@@ -38,6 +38,14 @@ class ValidatorError extends MongooseError {
|
||||
toString() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Ensure `name` and `message` show up in toJSON output re: gh-9296
|
||||
*/
|
||||
|
||||
toJSON() {
|
||||
return Object.assign({ name: this.name, message: this.message }, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user