Skip to content

Commit

Permalink
fix version exists check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Dickey committed Jul 30, 2016
1 parent 96354d4 commit f745258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ r.put('/:name', middleware.auth, function * () {
yield packages.upload(pkg)
this.body = yield packages.get(pkg.name)
} catch (err) {
if (err === packages(this.metric).errors.versionExists) {
if (err === packages.errors.versionExists) {
this.body = {error: err.toString()}
this.status = 409
} else {
Expand Down

0 comments on commit f745258

Please sign in to comment.