Skip to content

Commit

Permalink
check key with dat.key, bug fix from dat-node 1.3.2 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehand authored Feb 1, 2017
1 parent 3b500e7 commit b1e23fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = function (type, opts, dat) {

// TODO: clean up this logic
var resume = opts.resume || false
if (!opts.key && !resume) return ui.exit()('lib/download Key required to download')
var hasKey = dat && dat.key || opts.key
if (!hasKey && !resume) return ui.exit()('lib/download Key required to download')

var network = null
var stats = null
Expand Down

0 comments on commit b1e23fc

Please sign in to comment.