From dc9859cd834d50fc916d025966e85d00678d02e9 Mon Sep 17 00:00:00 2001 From: Alex Vernacchia Date: Mon, 13 Oct 2014 14:39:04 -0400 Subject: [PATCH] web-gui/updating entries shown on index page --- lib/storage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/storage.js b/lib/storage.js index dfc17eea9..261fb837e 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -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 -