Update utils.ts

This commit is contained in:
Dave Reid 2023-12-07 09:44:35 -06:00 committed by GitHub
parent 2810265746
commit 1a102bc9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
*/ */
export async function parseVersion(version: string): Promise<string> { export async function parseVersion(version: string): Promise<string> {
switch (true) { switch (true) {
case /^(latest|nightly|\d+\.x)$/.test(version): case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[ return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
version version
]; ];