diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index 3e0e4a35b..f2a32e30f 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -669,12 +669,7 @@ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compile const [componentNamespace] = componentName.split('.'); componentInfo = components.get(componentNamespace); } - if ( - ( - isFrontmatterDefinedComponent(componentName, componentInfo, state) && - !isCustomElementTag(componentName) - ) || isFragmentComponent(componentName) - ) { + if ((isFrontmatterDefinedComponent(componentName, componentInfo, state) && !isCustomElementTag(componentName)) || isFragmentComponent(componentName)) { if (hydrationAttributes.method) { throw new Error( `Unable to hydrate "${componentName}" because it is statically defined in the frontmatter script. Hydration directives may only be used on imported components.` @@ -697,10 +692,7 @@ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compile buffers[curr] += `h(${componentName}, ${attributes ? generateAttributes(attributes) : 'null'}`; paren++; return; - } else if ( - !componentInfo && - !isCustomElementTag(componentName) - ) { + } else if (!componentInfo && !isCustomElementTag(componentName)) { throw new Error(`Unable to render "${componentName}" because it is undefined\n ${state.filename}`); } if (componentName === 'Markdown') {