mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
console: console.dir() bypasses inspect() methods
Use the `customInspect: false` option of `util.inspect()` to bypass any custom inspect() function on the object being logged. Closes #2717.
This commit is contained in:
1 parent
43c1830e0a
commit
da8b0eefde
3 files changed
+15
-3
No files matched your search
+1
-1
@@ -66,7 +66,7 @@ Console.prototype.error = Console.prototype.warn;
|
||||
|
||||
|
||||
Console.prototype.dir = function(object) {
|
||||
this._stdout.write(util.inspect(object) + '\n');
|
||||
this._stdout.write(util.inspect(object, { customInspect: false }) + '\n');
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user