fix: various fixes for versions (#5238)
* fix: environment not showing when has mod loaders * fix: weird snapshot format by only grouping consecutive tags with 3 or more * fix: 26.1 snapshots not grouped properly in mc version picker * remove debug console.log
This commit is contained in:
@@ -126,12 +126,13 @@ export function formatVersionsForDisplay(
|
||||
|
||||
// show all snapshots if there's no release versions
|
||||
if (releaseVersionsAsRanges.length === 0) {
|
||||
const snapshotVersionsAsRanges = groupConsecutiveIndices(
|
||||
inputVersions.filter((projVer) =>
|
||||
allSnapshots.some((gameVer) => gameVer.version === projVer),
|
||||
),
|
||||
allSnapshots,
|
||||
const snapshotVersions = inputVersions.filter((projVer) =>
|
||||
allSnapshots.some((gameVer) => gameVer.version === projVer),
|
||||
)
|
||||
const snapshotVersionsAsRanges =
|
||||
snapshotVersions.length > 3
|
||||
? groupConsecutiveIndices(snapshotVersions, allSnapshots)
|
||||
: snapshotVersions
|
||||
output = [...snapshotVersionsAsRanges, ...output]
|
||||
} else {
|
||||
output = [...releaseVersionsAsRanges, ...output]
|
||||
|
||||
Reference in New Issue
Block a user