diff options
| author | 2023-10-02 12:31:07 -0700 | |
|---|---|---|
| committer | 2023-10-02 12:31:07 -0700 | |
| commit | abbe3916ed5d7b6adb5a4b376e5c563d36e07d31 (patch) | |
| tree | 2dba62d3d15c0842eb70067f67bd81d95a4abdad /src/js/node/net.js | |
| parent | 4073539837e2fc60860ddb231a71c9a34c388afd (diff) | |
| parent | 0a2d490bf8cb0dbfe3ccfc936d71b33fb9c59899 (diff) | |
| download | bun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.tar.gz bun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.tar.zst bun-abbe3916ed5d7b6adb5a4b376e5c563d36e07d31.zip | |
Merge remote-tracking branch 'origin/main' into dave/nodemodule-preloadmodules
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 = { |
