Skip to content

Commit

Permalink
fix: Remove unnecessary app version sorting (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Jun 29, 2024
1 parent c54c69b commit 345158e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/routes/patches/PatchItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,7 @@
<!-- Should this be hardcoded to get the version of the first package? -->
{#if patch.compatiblePackages?.length && patch.compatiblePackages[0].versions?.length}
{#if showAllVersions}
{#each patch.compatiblePackages[0].versions
.slice()
.sort((a, b) => {
const coercedA = coerce(a);
const coercedB = coerce(b);
if (coercedA && coercedB) return compare(coercedA, coercedB);
else if (!coercedA && !coercedB) return 0;
else return !coercedA ? 1 : -1;
})
.reverse() as version}
{#each patch.compatiblePackages[0].versions.reverse() as version}
<li class="patch-info">
🎯 {version}
</li>
Expand Down

0 comments on commit 345158e

Please sign in to comment.