Cleanup
This commit is contained in:
4
node_modules/mongoose/lib/schema/mixed.js
generated
vendored
4
node_modules/mongoose/lib/schema/mixed.js
generated
vendored
@@ -7,6 +7,7 @@
|
||||
const SchemaType = require('../schematype');
|
||||
const symbols = require('./symbols');
|
||||
const isObject = require('../helpers/isObject');
|
||||
const utils = require('../utils');
|
||||
|
||||
/**
|
||||
* Mixed SchemaType constructor.
|
||||
@@ -103,6 +104,9 @@ Mixed.set = SchemaType.set;
|
||||
*/
|
||||
|
||||
Mixed.prototype.cast = function(val) {
|
||||
if (val instanceof Error) {
|
||||
return utils.errorToPOJO(val);
|
||||
}
|
||||
return val;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user