diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 7f2844ed2..8df0440c4 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -183,15 +183,15 @@ export async function renderComponent( } if (Component && (Component as any).isAstroComponentFactory) { - async function * renderAstroComponentInline(): AsyncGenerator { + async function* renderAstroComponentInline(): AsyncGenerator { let iterable = await renderToIterable(result, Component as any, _props, slots); // If this component added any define:vars styles and the head has already been // sent out, we need to include those inline. - if(result.styles.size && alreadyHeadRenderedResults.has(result)) { + if (result.styles.size && alreadyHeadRenderedResults.has(result)) { let styles = Array.from(result.styles); result.styles.clear(); - for(const style of styles) { - if('define:vars' in style.props) { + for (const style of styles) { + if ('define:vars' in style.props) { // We only want to render the property value and not the full stylesheet // which is bundled in the head. style.children = ''; @@ -199,7 +199,7 @@ export async function renderComponent( } } } - yield * iterable; + yield* iterable; } return renderAstroComponentInline(); diff --git a/packages/astro/test/astro-directives.test.js b/packages/astro/test/astro-directives.test.js index 0a4bab43b..8bdccb90b 100644 --- a/packages/astro/test/astro-directives.test.js +++ b/packages/astro/test/astro-directives.test.js @@ -36,9 +36,9 @@ describe('Directives', async () => { ); const scopedTitleClass = $('.title') - .attr('class') - .split(' ') - .find((name) => /^astro-[A-Za-z0-9-]+/.test(name)); + .attr('class') + .split(' ') + .find((name) => /^astro-[A-Za-z0-9-]+/.test(name)); expect($($('style').get(1)).toString().replace(/\s+/g, '')).to.equal( ``