Skip to content

Commit a987972

Browse files
Sebastien-Ahkrincodebytere
authored andcommitted
stream: replace Function.prototype with primordial
PR-URL: #31204 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 073b4f2 commit a987972

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/_stream_writable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
const {
2929
Array,
30+
FunctionPrototype,
3031
ObjectDefineProperty,
3132
ObjectSetPrototypeOf,
3233
Symbol,
@@ -199,7 +200,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', {
199200
// whose prototype chain only points to Readable.
200201
var realHasInstance;
201202
if (typeof Symbol === 'function' && SymbolHasInstance) {
202-
realHasInstance = Function.prototype[SymbolHasInstance];
203+
realHasInstance = FunctionPrototype[SymbolHasInstance];
203204
ObjectDefineProperty(Writable, SymbolHasInstance, {
204205
value: function(object) {
205206
if (realHasInstance.call(this, object))

0 commit comments

Comments
 (0)