From a156e512591c71320f1d53387c1dcf819e5328e2 Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Mon, 11 Dec 2023 21:24:21 -0800 Subject: [PATCH] fix sorting (mfw) --- src/helpers/functions/missing.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/functions/missing.ts b/src/helpers/functions/missing.ts index 3d53ad8e..581377e0 100644 --- a/src/helpers/functions/missing.ts +++ b/src/helpers/functions/missing.ts @@ -76,8 +76,9 @@ export async function computeMissingResults( const versions: string[] = ( await axios.get(`${client.tokens.apiUrl}textures/versions/${edition}`) ).data; + // latest version if versions doesn't include version (unexisting/unsupported) - if (!versions.includes(version)) version = versions.sort(minecraftSorter).at(-1); + if (!versions.includes(version)) version = versions[0]; await callback(`Updating packs with latest version of \`${version}\` known...`); // same steps are used for both packs