From 9b57d18143b26043e49bbbb745aa4b23349e044d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Cruz?= Date: Fri, 5 Jul 2013 08:19:05 +0100 Subject: [PATCH] Small improv. --- lib/core/Manager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/Manager.js b/lib/core/Manager.js index a895ac44..201ab6f2 100644 --- a/lib/core/Manager.js +++ b/lib/core/Manager.js @@ -434,7 +434,7 @@ Manager.prototype._dissect = function () { semvers.sort(function (first, second) { var result = semver.rcompare(first.pkgMeta.version, second.pkgMeta.version); - // If they are equal and one of them has a wildcard target, + // If they are equal and one of them is a wildcard target, // give lower priority if (!result) { if (first.target === '*') { @@ -449,8 +449,8 @@ Manager.prototype._dissect = function () { }); // Convert wildcard targets to semver range targets - decEndpoints.forEach(function (decEndpoint) { - if (decEndpoint.target === '*' && decEndpoint.pkgMeta.version) { + semvers.forEach(function (decEndpoint) { + if (decEndpoint.target === '*') { decEndpoint.target = '~' + decEndpoint.pkgMeta.version; } });