Skip to content

Commit

Permalink
fix sorting (mfw)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Dec 12, 2023
1 parent 78775ba commit a156e51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/functions/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a156e51

Please sign in to comment.