From b1188fe5848194266e4700461110882268c8b7e0 Mon Sep 17 00:00:00 2001 From: AI Scout Agent Date: Sun, 31 May 2026 14:29:45 +0300 Subject: [PATCH] Fix algorithm function callback result type handling and remove unsafe 'any' cast --- src/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 472aaa5..2da5e2b 100644 --- a/src/index.js +++ b/src/index.js @@ -206,11 +206,7 @@ class CompressionPlugin { return; } - if (!Buffer.isBuffer(result)) { - resolve(Buffer.from(/** @type {string} */ (result))); - } else { - resolve(result); - } + resolve(Buffer.from(/** @type {Buffer} */ (result))); }, ); });