mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: path generation
This commit is contained in:
@@ -3,7 +3,7 @@ import { Providers } from './providers';
|
||||
import { CmdKDialog } from '~/components/CmdK';
|
||||
import { Header } from '~/components/Header';
|
||||
|
||||
export default function SidebarLayout({ children }: PropsWithChildren<any>) {
|
||||
export default function SidebarLayout({ children }: PropsWithChildren) {
|
||||
return (
|
||||
<Providers>
|
||||
<Header />
|
||||
|
||||
@@ -47,6 +47,10 @@ import { tryResolveDescription } from '~/util/summary';
|
||||
export async function generateStaticParams({ params }: { params: { package: string } }) {
|
||||
const packageName = params.package;
|
||||
|
||||
if (!packageName) {
|
||||
return [{ slug: [] }];
|
||||
}
|
||||
|
||||
try {
|
||||
let data: any[] = [];
|
||||
let versions: string[] = [];
|
||||
@@ -107,7 +111,7 @@ export async function generateStaticParams({ params }: { params: { package: stri
|
||||
}),
|
||||
];
|
||||
} catch {
|
||||
return { slug: [] };
|
||||
return [{ slug: [] }];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user