0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Merge pull request #143 from vernak2539/web-gui-proper-index-versions

web-gui/updating entries shown on index page
This commit is contained in:
Alex Kocharin 2014-10-17 11:30:04 +04:00
commit a1010be87a

View file

@ -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])
@ -548,4 +548,3 @@ Storage._merge_versions = function(local, up, config) {
}
module.exports = Storage