[ci] yarn format

This commit is contained in:
matthewp 2021-07-09 13:01:57 +00:00 committed by GitHub Actions
parent 1e01251454
commit 00cdbc4a46
3 changed files with 3 additions and 8 deletions

View file

@ -185,12 +185,7 @@ export interface AstroComponentMetadata {
componentExport?: { value: string; namespace?: boolean };
}
type AsyncRendererComponentFn<U> = (
Component: any,
props: any,
children: string | undefined,
metadata?: AstroComponentMetadata
) => Promise<U>;
type AsyncRendererComponentFn<U> = (Component: any, props: any, children: string | undefined, metadata?: AstroComponentMetadata) => Promise<U>;
export interface Renderer {
check: AsyncRendererComponentFn<boolean>;

View file

@ -51,7 +51,7 @@ React('Includes reactroot on hydrating components', async () => {
const div = $('#research');
assert.equal(div.attr('data-reactroot'), '', 'Has the hydration attr');
assert.equal(div.html(), 'foo bar <!-- -->1');
})
});
React('Throws helpful error message on window SSR', async () => {
const result = await runtime.load('/window');

View file

@ -37,7 +37,7 @@ function check(Component, props, children) {
function renderToStaticMarkup(Component, props, children, metadata) {
const vnode = h(Component, { ...props, children: h(StaticHtml, { value: children }), innerHTML: children });
let html;
if(metadata.hydrate) {
if (metadata.hydrate) {
html = renderToString(vnode);
} else {
html = reactRenderToStaticMarkup(vnode);