Skip to content

Commit

Permalink
Merge pull request #13778 from Automattic/vkarpov15/format-fix
Browse files Browse the repository at this point in the history
fix(debug): avoid putting virtuals and getters in debug output
  • Loading branch information
vkarpov15 committed Aug 25, 2023
2 parents 0f939e2 + c970700 commit d27d646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/drivers/node-mongodb-native/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const MongooseError = require('../../error/mongooseError');
const Collection = require('mongodb').Collection;
const ObjectId = require('../../types/objectid');
const getConstructorName = require('../../helpers/getConstructorName');
const internalToObjectOptions = require('../../options').internalToObjectOptions;
const stream = require('stream');
const util = require('util');

Expand Down Expand Up @@ -377,7 +378,7 @@ function format(obj, sub, color, shell) {
}

const clone = require('../../helpers/clone');
let x = clone(obj, { transform: false });
let x = clone(obj, internalToObjectOptions);
const constructorName = getConstructorName(x);

if (constructorName === 'Binary') {
Expand Down

0 comments on commit d27d646

Please sign in to comment.