Skip to content

Commit e45e73b

Browse files
authored
buffer: remove unnecessary assignment in fromString
The assignment to the encoding variable has no effect. Refs: #29217 PR-URL: #50199 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 765339a commit e45e73b

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)