mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix: properly display all versions in selector
This commit is contained in:
@@ -2,7 +2,6 @@ import { readFile } from 'node:fs/promises';
|
||||
import { join } from 'node:path';
|
||||
import { connect } from '@planetscale/database';
|
||||
import { cache } from 'react';
|
||||
import { N_RECENT_VERSIONS } from '~/util/constants';
|
||||
|
||||
const sql = connect({
|
||||
url: process.env.DATABASE_URL!,
|
||||
@@ -23,7 +22,7 @@ export const fetchVersions = cache(async (packageName: string): Promise<string[]
|
||||
]);
|
||||
|
||||
// @ts-expect-error: https://github.com/planetscale/database-js/issues/71
|
||||
return rows.map((row) => row.version).slice(0, N_RECENT_VERSIONS);
|
||||
return rows.map((row) => row.version);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user