Skip to content

Commit

Permalink
Fix listAvailable: return after cb(err) (OMG!)
Browse files Browse the repository at this point in the history
fixes #104
  • Loading branch information
marcelklehr committed Dec 8, 2015
1 parent c64193a commit db1e76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nodist.js
Expand Up @@ -339,7 +339,7 @@ nodist.prototype.listAvailable = function listAvailable(cb) {
if(result instanceof Array)
versions = versions.concat(result);
//throw an error if both fail
if(nodeErr && ioErr) cb(nodeErr);
if(nodeErr && ioErr) return cb(nodeErr);
//now set cache
that.availableCache = versions;
//otherwise we are done
Expand Down

0 comments on commit db1e76d

Please sign in to comment.