diff options
Diffstat (limited to 'src/js/node/net.js')
-rw-r--r-- | src/js/node/net.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/js/node/net.js b/src/js/node/net.js index 5283538c3..fc0aba548 100644 --- a/src/js/node/net.js +++ b/src/js/node/net.js @@ -79,17 +79,15 @@ const Socket = (function (InternalSocket) { enumerable: false, }); - return Object.defineProperty( - function Socket(options) { - return new InternalSocket(options); - }, - Symbol.hasInstance, - { - value(instance) { - return instance instanceof InternalSocket; - }, + function Socket(options) { + return new InternalSocket(options); + } + Socket.prototype = InternalSocket.prototype; + return Object.defineProperty(Socket, Symbol.hasInstance, { + value(instance) { + return instance instanceof InternalSocket; }, - ); + }); })( class Socket extends Duplex { static #Handlers = { |