0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

[ci] format

This commit is contained in:
Alex Jet 2024-01-04 11:02:19 +00:00 committed by astrobot-houston
parent 0903ef9049
commit 6834b3d3fe

View file

@ -1,6 +1,6 @@
import type { AstroComponentMetadata } from 'astro';
import { Component as BaseComponent, h, type VNode } from 'preact';
import prepass from "preact-ssr-prepass";
import prepass from 'preact-ssr-prepass';
import { render } from 'preact-render-to-string';
import { getContext } from './context.js';
import { restoreSignalsOnProps, serializeSignals } from './signals.js';
@ -12,7 +12,12 @@ const slotName = (str: string) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w
let originalConsoleError: typeof console.error;
let consoleFilterRefs = 0;
async function check(this: RendererContext, Component: any, props: Record<string, any>, children: any) {
async function check(
this: RendererContext,
Component: any,
props: Record<string, any>,
children: any
) {
if (typeof Component !== 'function') return false;
if (Component.name === 'QwikComponent') return false;
@ -82,9 +87,9 @@ async function renderToStaticMarkup(
value: children,
})
: children
)
);
await prepass(vNode)
await prepass(vNode);
const html = render(vNode);
return { attrs, html };
}