Skip to content

Commit

Permalink
buffer: remove unnecessary assignment in fromString
Browse files Browse the repository at this point in the history
The assignment to the encoding variable has no effect.

Refs: #29217
PR-URL: #50199
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
tniessen authored and targos committed Oct 23, 2023
1 parent 317e447 commit 9cd68b9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9cd68b9

Please sign in to comment.