Skip to content

Commit

Permalink
bs58: avoid comparison, check if property exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Jul 24, 2014
1 parent 8a48bbd commit dede3a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bs58.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function decode(string) {
if (string.length === 0) return new Buffer(0)

var input = string.split('').map(function(c){
assert.notEqual(ALPHABET_MAP[c], undefined, 'Non-base58 character')
assert(c in ALPHABET_MAP, 'Non-base58 character')
return ALPHABET_MAP[c]
})

Expand Down

0 comments on commit dede3a7

Please sign in to comment.