diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 38f0a0c7ef..a60f0f4463 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -30,7 +30,7 @@ async function _render(child: any): Promise { } // Add a comment explaining why each of these are needed. // Maybe create clearly named function for what this is doing. - else if (child instanceof AstroComponent || child.toString() === '[object AstroComponent]') { + else if (child instanceof AstroComponent || Object.prototype.toString.call(child) === '[object AstroComponent]') { return await renderAstroComponent(child); } else { return child;