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; } });