Small improv.

This commit is contained in:
André Cruz
2013-07-05 08:19:05 +01:00
parent 9f0ac51e06
commit 9b57d18143

View File

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