diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 6ea57180514557..652d6b1b924cea 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -4,6 +4,7 @@ const { Array, FunctionPrototypeBind, MathMin, + MathMax, ObjectDefineProperty, ObjectSetPrototypeOf, PromisePrototypeThen, @@ -152,7 +153,7 @@ function ReadStream(path, options) { // A little bit bigger buffer and water marks by default options = copyObject(getOptions(options, {})); if (options.highWaterMark === undefined) - options.highWaterMark = Math.max(Buffer.poolSize, 64 * 1024); + options.highWaterMark = MathMax(Buffer.poolSize, 64 * 1024); if (options.autoDestroy === undefined) { options.autoDestroy = false;