Skip to content

Commit d27d646

Browse files
authored
Merge pull request #13778 from Automattic/vkarpov15/format-fix
fix(debug): avoid putting virtuals and getters in debug output
2 parents 0f939e2 + c970700 commit d27d646

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/drivers/node-mongodb-native/collection.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const MongooseError = require('../../error/mongooseError');
99
const Collection = require('mongodb').Collection;
1010
const ObjectId = require('../../types/objectid');
1111
const getConstructorName = require('../../helpers/getConstructorName');
12+
const internalToObjectOptions = require('../../options').internalToObjectOptions;
1213
const stream = require('stream');
1314
const util = require('util');
1415

@@ -377,7 +378,7 @@ function format(obj, sub, color, shell) {
377378
}
378379

379380
const clone = require('../../helpers/clone');
380-
let x = clone(obj, { transform: false });
381+
let x = clone(obj, internalToObjectOptions);
381382
const constructorName = getConstructorName(x);
382383

383384
if (constructorName === 'Binary') {

0 commit comments

Comments
 (0)