Skip to content

Commit

Permalink
Fixing version
Browse files Browse the repository at this point in the history
  • Loading branch information
wking-io committed Aug 30, 2023
1 parent 85deb29 commit bfdeec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/docs/versions.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function getProductVersions({
return versionsCache.fetch(`${isPrivate ? 'private' : 'public'}:${product}`)
}

const versionValidator = z.array(z.string().regex(/\d\.\d\.\d/)).nonempty()
const versionValidator = z.array(z.string().regex(/\d(\.\d){0,2}/)).nonempty()

async function getAllVersions({
product,
Expand All @@ -68,7 +68,7 @@ export function versionsToMenu(
ref: string,
versions: string[],
): NonEmptyZipperObj<NavLink> | null {
const sorted = semver.rsort(versions).map((v, i) => ({
const sorted = versions.map((v, i) => ({
label: i === 0 ? `${v} (latest)` : v,
to: `/${product}/${i === 0 ? 'latest' : v}`,
}))
Expand Down

0 comments on commit bfdeec5

Please sign in to comment.