From 134c80e1939f27a2b21cefa3deec4ebc7e3a1315 Mon Sep 17 00:00:00 2001 From: Sebastien Ahkrin Date: Mon, 6 Jan 2020 03:32:21 +0100 Subject: [PATCH] stream: replace Function.prototype by FunctionPrototype --- lib/_stream_writable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 8d427f1afe1da6..3f029883705a0a 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -27,6 +27,7 @@ const { Array, + FunctionPrototype, ObjectDefineProperty, ObjectSetPrototypeOf, Symbol, @@ -205,7 +206,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', { // whose prototype chain only points to Readable. var realHasInstance; if (typeof Symbol === 'function' && SymbolHasInstance) { - realHasInstance = Function.prototype[SymbolHasInstance]; + realHasInstance = FunctionPrototype[SymbolHasInstance]; ObjectDefineProperty(Writable, SymbolHasInstance, { value: function(object) { if (realHasInstance.call(this, object))