diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index 664055b5c5b9af..ece0f2741a3811 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -18,7 +18,7 @@ const { const { Readable, Writable } = require('stream'); const EventEmitter = require('events'); -const util = require('util'); +const { inspect } = require('internal/util/inspect'); let debuglog; function debug(...args) { @@ -122,7 +122,7 @@ MessagePort.prototype.close = function(cb) { MessagePortPrototype.close.call(this); }; -Object.defineProperty(MessagePort.prototype, util.inspect.custom, { +Object.defineProperty(MessagePort.prototype, inspect.custom, { enumerable: false, writable: false, value: function inspect() { // eslint-disable-line func-name-matching