git ssb

3+

cel / ssb-npm-registry



Commit 214366b16fff9d49e0099e80b227653614a5d16c

Fix callback

cel committed on 1/20/2018, 12:36:27 AM
Parent: 9bc172fc9883a9eb2fa1ceee027cc37daadcc6e6

Files changed

index.jschanged
index.jsView
@@ -740,20 +740,20 @@
740740 obj['dist-tags'][tag] = distTags[tag].version
741741 }
742742 if (spec) resolveSpec()
743743 else if (self.fetchAll) resolveAll()
744- else done()
744+ else resolved()
745745 })
746746 )
747747 function resolveSpec() {
748748 var version = obj['dist-tags'][spec]
749749 || semver.maxSatisfying(Object.keys(obj.versions), spec)
750750 obj = obj.versions[version]
751751 if (!obj) return self.respondError(404, 'version not found: ' + spec)
752752 self.populatePackageJson(obj, function (err, pkg) {
753- if (err) return self.respondError(500, err.stack || err)
753+ if (err) return resolved(err)
754754 obj = pkg || obj
755- done()
755+ resolved()
756756 })
757757 }
758758 function resolveVersion(version, cb) {
759759 self.populatePackageJson(obj.versions[version], function (err, pkg) {

Built with git-ssb-web