diff --git a/lib/zlib.js b/lib/zlib.js index ad0518b216a49e..2fb329814d3dee 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -779,8 +779,8 @@ function createConvenienceMethod(ctor, sync) { }; } -const kMaxBrotliParam = MathMax.apply( - ObjectEntries(constants) +const kMaxBrotliParam = MathMax( + ...ObjectEntries(constants) .map(({ 0: key, 1: value }) => (key.startsWith('BROTLI_PARAM_') ? value : 0)), ); const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1);