fix(website): constructors show on too many items (#10880)

This commit is contained in:
Qjuh
2025-05-03 22:25:00 +02:00
committed by GitHub
parent 75179fbf9f
commit 65f41bea96
3 changed files with 3 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ export async function DocItem({
<Outline node={node} />
{node.constructor ? <ConstructorNode node={node.constructor} version={version} /> : null}
{node.construct ? <ConstructorNode node={node.construct} version={version} /> : null}
{node.typeParameters?.length ? (
<div className="flex flex-col gap-4">

View File

@@ -20,7 +20,7 @@ export async function SyntaxHighlighter({
return (
<>
{/* eslint-disable-next-line react/no-danger */}
<div className={className} dangerouslySetInnerHTML={{ __html: codeHTML }} />
<span className={className} dangerouslySetInnerHTML={{ __html: codeHTML }} />
</>
);
}

View File

@@ -889,7 +889,7 @@ function itemClass(item: ApiClass) {
extends: itemHierarchyText({ item, type: 'Extends' }),
implements: itemHierarchyText({ item, type: 'Implements' }),
typeParameters: itemTypeParameters(item),
constructor: constructor ? itemConstructor(constructor) : null,
construct: constructor ? itemConstructor(constructor) : null,
members: itemMembers(item),
};
}