mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Minor fix to sorting versions.
This commit is contained in:
@@ -530,10 +530,10 @@ Manager.prototype._electSuitable = function (name, semvers, nonSemvers) {
|
||||
} else {
|
||||
// Give priority to the one that is a version
|
||||
if (version1) {
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
if (version2) {
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,10 +226,10 @@ ResolveCache.prototype.list = function () {
|
||||
return semver.compare(pkgMeta1.version, pkgMeta2.version);
|
||||
}
|
||||
if (pkgMeta1.version) {
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
if (pkgMeta2.version) {
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user