Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
fix hex validation
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderer committed May 31, 2017
1 parent 13c9a03 commit fbe8985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ exports.toBuffer = function (v) {
if (Array.isArray(v)) {
v = Buffer.from(v)
} else if (typeof v === 'string') {
if (exports.isHexPrefixed(v)) {
if (exports.isHexString(v)) {
v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex')
} else {
v = Buffer.from(v)
Expand Down

0 comments on commit fbe8985

Please sign in to comment.