fix: ensure displayName is a string

This commit is contained in:
Nate Moore 2023-08-15 13:44:50 -05:00
parent f744d2bb76
commit 896ca32d53

View file

@ -89,7 +89,7 @@ async function renderFrameworkComponent(
const { renderers, clientDirectives } = result; const { renderers, clientDirectives } = result;
const metadata: AstroComponentMetadata = { const metadata: AstroComponentMetadata = {
astroStaticSlot: true, astroStaticSlot: true,
displayName, displayName: typeof displayName === 'string' ? displayName : '',
}; };
const { hydration, isPage, props } = extractDirectives(_props, clientDirectives); const { hydration, isPage, props } = extractDirectives(_props, clientDirectives);