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 Nov 11, 2023
1 parent 5c56081 commit 458d9a8
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 458d9a8

Please sign in to comment.