fix latest snapshot showing twice sometimes with version ranges (#5964)
This commit is contained in:
@@ -165,7 +165,7 @@ export function formatVersionsForDisplay(gameVersions, overrideTags) {
|
||||
output = [...releaseVersionsAsRanges, ...output]
|
||||
}
|
||||
|
||||
if (latestSnapshot && !output.includes(latestSnapshot)) {
|
||||
if (releaseVersionsAsRanges.length > 0 && latestSnapshot) {
|
||||
output = [latestSnapshot, ...output]
|
||||
}
|
||||
return output
|
||||
|
||||
@@ -141,7 +141,7 @@ export function formatVersionsForDisplay(
|
||||
output = [...releaseVersionsAsRanges, ...output]
|
||||
}
|
||||
|
||||
if (latestSnapshot && !output.includes(latestSnapshot)) {
|
||||
if (releaseVersionsAsRanges.length > 0 && latestSnapshot) {
|
||||
output = [latestSnapshot, ...output]
|
||||
}
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user