Skip to content

Commit 9c5be79

Browse files
tniessenalexfernandez
authored andcommitted
buffer: remove unnecessary assignment in fromString
The assignment to the encoding variable has no effect. Refs: nodejs#29217 PR-URL: nodejs#50199 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a0ae8ce commit 9c5be79

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/buffer.js

-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ function fromString(string, encoding) {
475475
if (string.length === 0)
476476
return new FastBuffer();
477477
ops = encodingOps.utf8;
478-
encoding = undefined;
479478
} else {
480479
ops = getEncodingOps(encoding);
481480
if (ops === undefined)

0 commit comments

Comments
 (0)