From 79dd4ab5814bac840d891a360c157ce3b9369776 Mon Sep 17 00:00:00 2001 From: Hannes Rasmussen <111380153+Hannesrasmussen@users.noreply.github.com> Date: Fri, 25 Oct 2024 03:30:25 +0200 Subject: [PATCH] fix(component-meta): error when signatures is undefined (#4930) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 山吹色御守 <85992002+KazariEX@users.noreply.github.com> --- packages/component-meta/lib/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/component-meta/lib/base.ts b/packages/component-meta/lib/base.ts index a0d9fbd5b8..901dda662a 100644 --- a/packages/component-meta/lib/base.ts +++ b/packages/component-meta/lib/base.ts @@ -540,7 +540,7 @@ function createSchemaResolvers( function resolveSlotProperties(prop: ts.Symbol): SlotMeta { const propType = typeChecker.getNonNullableType(typeChecker.getTypeOfSymbolAtLocation(prop, symbolNode)); const signatures = propType.getCallSignatures(); - const paramType = signatures[0].parameters[0]; + const paramType = signatures[0]?.parameters[0]; const subtype = paramType ? typeChecker.getTypeOfSymbolAtLocation(paramType, symbolNode) : typeChecker.getAnyType(); let schema: PropertyMetaSchema; let declarations: Declaration[];