mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
chore: remove nextjs patch
This commit is contained in:
@@ -120,7 +120,7 @@ export async function generateStaticParams({ params: { package: packageName, ver
|
||||
const modelJSON = await fetchModelJSON(packageName, version);
|
||||
|
||||
if (!modelJSON) {
|
||||
return [];
|
||||
return [{ package: packageName, version, item: '' }];
|
||||
}
|
||||
|
||||
const model = addPackageToModel(new ApiModel(), modelJSON);
|
||||
@@ -129,10 +129,12 @@ export async function generateStaticParams({ params: { package: packageName, ver
|
||||
const entry = pkg?.entryPoints[0];
|
||||
|
||||
if (!entry) {
|
||||
return [];
|
||||
return [{ package: packageName, version, item: '' }];
|
||||
}
|
||||
|
||||
return entry.members.map((member: ApiItem) => ({
|
||||
package: packageName,
|
||||
version,
|
||||
item: `${member.displayName}${OVERLOAD_SEPARATOR}${member.kind}`,
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -5,11 +5,15 @@ import { addPackageToModel } from './addPackageToModel';
|
||||
import { OVERLOAD_SEPARATOR, PACKAGES } from './constants';
|
||||
import { findMember, findMemberByKey } from './model';
|
||||
|
||||
export const fetchMember = cache(async (packageName: string, branchName: string, item: string) => {
|
||||
export const fetchMember = cache(async (packageName: string, branchName: string, item?: string) => {
|
||||
if (!PACKAGES.includes(packageName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const model = new ApiModel();
|
||||
|
||||
if (branchName === 'main') {
|
||||
|
||||
Reference in New Issue
Block a user