From 3bf4e0a172828ef750d4553ebb502e7cfb15083f Mon Sep 17 00:00:00 2001
From: Yagiz Nizipli <yagiz@nizipli.com>
Date: Sun, 1 Sep 2024 13:32:20 -0400
Subject: [PATCH] Update zlib.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
---
 lib/zlib.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);