Skip to content

Commit

Permalink
Merge pull request #143 from vernak2539/web-gui-proper-index-versions
Browse files Browse the repository at this point in the history
web-gui/updating entries shown on index page
  • Loading branch information
rlidwka committed Oct 17, 2014
2 parents 08f2187 + dc9859c commit a1010be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ Storage.prototype.get_local = function(callback) {
var getPackage = function(i) {
self.local.get_package(locals[i], function(err, info) {
if (!err) {
var latest = Array.isArray(info['dist-tags'].latest)
? utils.semver_sort(info['dist-tags'].latest)[0]
var latest = Array.isArray(info['dist-tags'].latest)
? utils.semver_sort(info['dist-tags'].latest).pop()
: info['dist-tags'].latest
if (info.versions[latest]) {
packages.push(info.versions[latest])
Expand Down Expand Up @@ -548,4 +548,3 @@ Storage._merge_versions = function(local, up, config) {
}

module.exports = Storage

0 comments on commit a1010be

Please sign in to comment.