From 739d3b971d989f8f4596499d895aba7e8df4facd Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Wed, 17 Nov 2021 16:19:54 -0500 Subject: [PATCH] Support custom elements (#1854) * Support custom elements Support non-object/non-function components * fix: ensure component is not string before throwing Co-authored-by: Nate Moore --- packages/astro/src/runtime/server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 68f020b47..38f0a0c7e 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -145,7 +145,7 @@ export async function renderComponent(result: SSRResult, displayName: string, Co } const probableRendererNames = guessRenderers(metadata.componentUrl); - if (Array.isArray(renderers) && renderers.length === 0) { + if (Array.isArray(renderers) && renderers.length === 0 && typeof Component !== 'string') { const message = `Unable to render ${metadata.displayName}! There are no \`renderers\` set in your \`astro.config.mjs\` file.