Skip to content

Commit 50953d2

Browse files
ChALkeRljharb
andauthored
Update index.js
Co-authored-by: Jordan Harband <[email protected]>
1 parent 3ae1844 commit 50953d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ function toBuffer(data, encoding) {
8080
data.constructor &&
8181
typeof data.constructor.isBuffer === 'function' &&
8282
data.constructor.isBuffer(data)
83-
) return Buffer.from(data)
83+
) {
84+
return Buffer.from(data)
85+
}
8486

8587
throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')
8688
}

0 commit comments

Comments
 (0)