diff options
author | 2021-11-11 16:56:59 +0000 | |
---|---|---|
committer | 2021-11-11 16:56:59 +0000 | |
commit | 7bb768ddab3d7a4d98682f0a74653e3e8c40602c (patch) | |
tree | 89609ee44d3b2d6b3a93c74c49d6e6ebe6907250 | |
parent | b958088c3dbabc43f698ff6684e6d54a8ec189f4 (diff) | |
download | astro-7bb768ddab3d7a4d98682f0a74653e3e8c40602c.tar.gz astro-7bb768ddab3d7a4d98682f0a74653e3e8c40602c.tar.zst astro-7bb768ddab3d7a4d98682f0a74653e3e8c40602c.zip |
[ci] yarn format
-rw-r--r-- | packages/astro/src/runtime/server/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index a4db5c9fb..3985e7b51 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -223,7 +223,7 @@ export function addAttribute(value: any, key: string) { } // Boolean only needs the key - if(value === true && key.startsWith('data-')) { + if (value === true && key.startsWith('data-')) { return ` ${key}`; } else { return ` ${key}="${toAttributeString(value)}"`; @@ -287,7 +287,7 @@ export async function renderPage(result: SSRResult, Component: AstroComponentFac const scripts = Array.from(result.scripts) .filter(uniqueElements) .map((script, i) => { - if('data-astro-component-hydration' in script.props) { + if ('data-astro-component-hydration' in script.props) { needsHydrationStyles = true; } return renderElement('script', { @@ -295,8 +295,8 @@ export async function renderPage(result: SSRResult, Component: AstroComponentFac props: { ...script.props, 'astro-script': result._metadata.pathname + '/script-' + i }, }); }); - if(needsHydrationStyles) { - styles.push(renderElement('style', { props: { 'astro-style': true },children: 'astro-root, astro-fragment { display: contents; }' })) + if (needsHydrationStyles) { + styles.push(renderElement('style', { props: { 'astro-style': true }, children: 'astro-root, astro-fragment { display: contents; }' })); } return template.replace('</head>', styles.join('\n') + scripts.join('\n') + '</head>'); } |