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

Commit

Permalink
Prefer const over let
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Oct 10, 2018
1 parent a581e42 commit ec693c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ exports.decode = function decode (buf) {
throw new Error('multihash too short. must be > 3 bytes.')
}

let code = varint.decode(buf)
const code = varint.decode(buf)
if (!exports.isValidCode(code)) {
throw new Error(`multihash unknown function code: 0x${code.toString(16)}`)
}
buf = buf.slice(varint.decode.bytes)

let len = varint.decode(buf)
const len = varint.decode(buf)
if (len < 1) {
throw new Error(`multihash invalid length: 0x${len.toString(16)}`)
}
Expand Down

0 comments on commit ec693c7

Please sign in to comment.