diff --git a/.changeset/tame-fans-happen.md b/.changeset/tame-fans-happen.md new file mode 100644 index 0000000000..b3feaa8b7e --- /dev/null +++ b/.changeset/tame-fans-happen.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix issue where `renderToFinalDestination` would throw in internal Astro code diff --git a/packages/astro/src/runtime/server/render/any.ts b/packages/astro/src/runtime/server/render/any.ts index 89c9275769..0b61f919cd 100644 --- a/packages/astro/src/runtime/server/render/any.ts +++ b/packages/astro/src/runtime/server/render/any.ts @@ -18,6 +18,7 @@ export async function renderChild(destination: RenderDestination, child: any) { }); }); for (const childRender of childRenders) { + if (!childRender) continue; await childRender.renderToFinalDestination(destination); } } else if (typeof child === 'function') {