mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-10 21:06:17 +00:00
fix: use semver sort for ccos updates
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
import type { DirectoryListing } from "$lib/meta/types/listing";
|
||||
import { compare } from "semver";
|
||||
|
||||
export const load = (async ({ fetch, params }) => {
|
||||
const result = await fetch(
|
||||
@@ -9,7 +10,7 @@ export const load = (async ({ fetch, params }) => {
|
||||
|
||||
return {
|
||||
versions: (data as DirectoryListing[]).sort((a, b) =>
|
||||
b.name.localeCompare(a.name),
|
||||
compare(b.name, a.name),
|
||||
),
|
||||
device: params.device,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user