mirror of
https://github.com/bower/bower.git
synced 2026-01-23 13:17:55 -05:00
Small improv.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user