Skip to content

Commit

Permalink
Fixing copy and paste bug/typo
Browse files Browse the repository at this point in the history
As mentioned in the original project [related bug](agnoster#9 (comment)), the `bits` variable would never be reached because the `skip` one cannot possibly be less than zero.

I am not sure this solves anyhow possible library gotchas, but for sure it removes a condition brought there by a copy and paste, and able to make every linter complain about `bits` being undefined.
  • Loading branch information
WebReflection authored Sep 29, 2016
1 parent 89420f2 commit 22696ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/base32.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function Decoder() {
}

this.finish = function(check) {
var output = this.output + (skip < 0 ? alphabet[bits >> 3] : '') + (check ? '$' : '')
var output = this.output + (check ? '$' : '')
this.output = ''
return output
}
Expand Down

0 comments on commit 22696ec

Please sign in to comment.