Skip to content

Commit 9c98d25

Browse files
Sebastien-AhkrinMylesBorins
authored andcommitted
stream: replace Function.prototype with primordial
PR-URL: #31204 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 9643718 commit 9c98d25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/_stream_writable.js

+2-1
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,
@@ -205,7 +206,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', {
205206
// whose prototype chain only points to Readable.
206207
var realHasInstance;
207208
if (typeof Symbol === 'function' && SymbolHasInstance) {
208-
realHasInstance = Function.prototype[SymbolHasInstance];
209+
realHasInstance = FunctionPrototype[SymbolHasInstance];
209210
ObjectDefineProperty(Writable, SymbolHasInstance, {
210211
value: function(object) {
211212
if (realHasInstance.call(this, object))

0 commit comments

Comments
 (0)