diff options
author | 2022-08-15 17:12:41 +0000 | |
---|---|---|
committer | 2022-08-15 17:12:41 +0000 | |
commit | 5f092230f67811b13242d39851177162032cc13f (patch) | |
tree | 09a3f215388d1c4c9d33b409cc03c4afc12fa75a | |
parent | b55f76c1cafb7918f7087c6df03dd1d59eeaa065 (diff) | |
download | astro-5f092230f67811b13242d39851177162032cc13f.tar.gz astro-5f092230f67811b13242d39851177162032cc13f.tar.zst astro-5f092230f67811b13242d39851177162032cc13f.zip |
[ci] format
-rw-r--r-- | packages/astro/src/runtime/server/render/component.ts | 7 | ||||
-rw-r--r-- | 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; } |