Skip to content

Commit 01e19f1

Browse files
ronagtargos
andauthored
Update lib/buffer.js
Co-authored-by: Michaël Zasso <[email protected]>
1 parent 11fe4ff commit 01e19f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ function createFromString(string, ops, length = ops.byteLength(string)) {
476476

477477
function fromString(string, encoding) {
478478
let ops;
479-
if (!encoding || encoding === 'utf8') {
479+
if (encoding === undefined || encoding === 'utf8') {
480480
ops = encodingOps.utf8;
481481
} else {
482482
ops = getEncodingOps(encoding);

0 commit comments

Comments
 (0)