From 8bdd9217c0dc934bb2c07fb6661d49e84fa8d6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 16 Oct 2023 16:48:34 +0000 Subject: [PATCH] buffer: remove unnecessary assignment in fromString The assignment to the encoding variable has no effect. Refs: https://github.com/nodejs/node/pull/29217 --- lib/buffer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index 0ff7c1920adbba..ee30c69cc9611c 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -475,7 +475,6 @@ function fromString(string, encoding) { if (string.length === 0) return new FastBuffer(); ops = encodingOps.utf8; - encoding = undefined; } else { ops = getEncodingOps(encoding); if (ops === undefined)