Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix(hashes): missed a spot for hashAlgorithm defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Mar 2, 2017
1 parent c60a2fa commit 45997d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports.byDigest = function getByDigest (cache, digest, opts) {
}
function getData (byDigest, cache, key, opts) {
opts = opts || {}
opts.hashAlgorithm = opts.hashAlgorithm || 'sha1'
opts.hashAlgorithm = opts.hashAlgorithm || 'sha512'
const memoized = (
byDigest
? memo.get.byDigest(cache, key, opts.hashAlgorithm)
Expand Down Expand Up @@ -112,7 +112,7 @@ function getStream (cache, key, opts) {
module.exports.stream.byDigest = getStreamDigest
function getStreamDigest (cache, digest, opts) {
opts = opts || {}
opts.hashAlgorithm = opts.hashAlgorithm || 'sha1'
opts.hashAlgorithm = opts.hashAlgorithm || 'sha512'
const memoized = memo.get.byDigest(cache, digest, opts.hashAlgorithm)
if (memoized && opts.memoize !== false) {
const stream = through()
Expand Down

0 comments on commit 45997d8

Please sign in to comment.