Commit 214366b16fff9d49e0099e80b227653614a5d16c
Fix callback
cel committed on 1/20/2018, 12:36:27 AMParent: 9bc172fc9883a9eb2fa1ceee027cc37daadcc6e6
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -740,20 +740,20 @@ | ||
740 | 740 | obj['dist-tags'][tag] = distTags[tag].version |
741 | 741 | } |
742 | 742 | if (spec) resolveSpec() |
743 | 743 | else if (self.fetchAll) resolveAll() |
744 | - else done() | |
744 | + else resolved() | |
745 | 745 | }) |
746 | 746 | ) |
747 | 747 | function resolveSpec() { |
748 | 748 | var version = obj['dist-tags'][spec] |
749 | 749 | || semver.maxSatisfying(Object.keys(obj.versions), spec) |
750 | 750 | obj = obj.versions[version] |
751 | 751 | if (!obj) return self.respondError(404, 'version not found: ' + spec) |
752 | 752 | self.populatePackageJson(obj, function (err, pkg) { |
753 | - if (err) return self.respondError(500, err.stack || err) | |
753 | + if (err) return resolved(err) | |
754 | 754 | obj = pkg || obj |
755 | - done() | |
755 | + resolved() | |
756 | 756 | }) |
757 | 757 | } |
758 | 758 | function resolveVersion(version, cb) { |
759 | 759 | self.populatePackageJson(obj.versions[version], function (err, pkg) { |
Built with git-ssb-web