mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
fix: default to main for stable selection
This commit is contained in:
@@ -18,7 +18,7 @@ export const getStaticProps: GetStaticProps = async () => {
|
|||||||
PACKAGES.map(async (pkg) => {
|
PACKAGES.map(async (pkg) => {
|
||||||
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`);
|
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${pkg}`);
|
||||||
const versions = await response.json();
|
const versions = await response.json();
|
||||||
const latestVersion = versions.at(-2);
|
const latestVersion = versions.at(-2) ?? 'main';
|
||||||
return { packageName: pkg, version: latestVersion };
|
return { packageName: pkg, version: latestVersion };
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user