diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index f44f14926..52d19fd87 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -131,6 +131,9 @@ export async function renderComponent(result: SSRResult, displayName: string, Co const children = await renderSlot(result, slots?.default); if (Component === Fragment) { + if (children == null) { + return children; + } return unescapeHTML(children); }