Permalink
Browse files

fix hex validation

  • Loading branch information...
wanderer committed May 31, 2017
1 parent 13c9a03 commit fbe8985c8568c4dc6d19d36396cb2cc6c75bbcf3
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
@@ -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)

0 comments on commit fbe8985

Please sign in to comment.