summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2021-07-21 16:28:09 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-07-21 16:28:09 +0000
commit91f7c89e771ac1cfc5977f3168446f394cb61835 (patch)
tree0e4f44b8ad61be20777af8efd74b10c926fb76f3
parent4a601adbf2ca40d813336b57d76a6736fa8ee2d0 (diff)
downloadastro-91f7c89e771ac1cfc5977f3168446f394cb61835.tar.gz
astro-91f7c89e771ac1cfc5977f3168446f394cb61835.tar.zst
astro-91f7c89e771ac1cfc5977f3168446f394cb61835.zip
[ci] yarn format
Diffstat (limited to '')
-rw-r--r--packages/astro/src/compiler/codegen/index.ts12
1 files changed, 2 insertions, 10 deletions
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') {