mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 01:41:05 -05:00
Fixed version normalization for legacy versions
This commit is contained in:
parent
926b1a264b
commit
f9620d09b5
1 changed files with 6 additions and 1 deletions
|
@ -185,7 +185,7 @@ function normalizeUnknownMinecraftVersion(version: string, releaseVersion?: stri
|
|||
return SPECIAL_VERSIONS.get(version);
|
||||
}
|
||||
|
||||
if (!releaseVersion || version === releaseVersion) {
|
||||
if (!releaseVersion || version === releaseVersion || version.substring(1).startsWith(releaseVersion)) {
|
||||
return normalizeOldMinecraftVersion(version);
|
||||
}
|
||||
|
||||
|
@ -207,6 +207,11 @@ function normalizeUnknownMinecraftVersion(version: string, releaseVersion?: stri
|
|||
} else {
|
||||
version = normalizeOldMinecraftVersion(version);
|
||||
}
|
||||
|
||||
if (version.startsWith(`${releaseVersion}-`)) {
|
||||
return version;
|
||||
}
|
||||
|
||||
return `${releaseVersion}-${version}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue