From 5f092230f67811b13242d39851177162032cc13f Mon Sep 17 00:00:00 2001 From: matthewp Date: Mon, 15 Aug 2022 17:12:41 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/runtime/server/render/component.ts | 7 ++++++- packages/astro/src/runtime/server/render/page.ts | 9 +++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts index 7bf5f7e56..066a86353 100644 --- a/packages/astro/src/runtime/server/render/component.ts +++ b/packages/astro/src/runtime/server/render/component.ts @@ -6,7 +6,12 @@ import { extractDirectives, generateHydrateScript } from '../hydration.js'; import { serializeProps } from '../serialize.js'; import { shorthash } from '../shorthash.js'; import { renderSlot } from './any.js'; -import { isAstroComponentFactory, renderAstroComponent, renderTemplate, renderToIterable } from './astro.js'; +import { + isAstroComponentFactory, + renderAstroComponent, + renderTemplate, + renderToIterable, +} from './astro.js'; import { Fragment, Renderer } from './common.js'; import { componentIsHTMLElement, renderHTMLElement } from './dom.js'; import { formatList, internalSpreadAttributes, renderElement, voidElementNames } from './util.js'; diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts index c2a3921c7..163441d39 100644 --- a/packages/astro/src/runtime/server/render/page.ts +++ b/packages/astro/src/runtime/server/render/page.ts @@ -8,7 +8,7 @@ import { renderComponent } from './component.js'; import { maybeRenderHead } from './head.js'; const encoder = new TextEncoder(); -const needsHeadRenderingSymbol = Symbol.for('astro.needsHeadRendering'); +const needsHeadRenderingSymbol = Symbol.for('astro.needsHeadRendering'); type NonAstroPageComponent = { name: string; @@ -16,10 +16,7 @@ type NonAstroPageComponent = { }; function nonAstroPageNeedsHeadInjection(pageComponent: NonAstroPageComponent): boolean { - return ( - (needsHeadRenderingSymbol in pageComponent) && - !!pageComponent[needsHeadRenderingSymbol] - ); + return needsHeadRenderingSymbol in pageComponent && !!pageComponent[needsHeadRenderingSymbol]; } export async function renderPage( @@ -45,7 +42,7 @@ export async function renderPage( // This symbol currently exists for md components, but is something that could // be added for any page-level component that's not an Astro component. // to signal that head rendering is needed. - if(nonAstroPageNeedsHeadInjection(componentFactory)) { + if (nonAstroPageNeedsHeadInjection(componentFactory)) { for await (let chunk of maybeRenderHead(result)) { html += chunk; }