Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Jan 4, 2024
1 parent 0903ef9 commit 6834b3d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/integrations/preact/src/server.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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;

Expand Down Expand Up @@ -82,9 +87,9 @@ async function renderToStaticMarkup(
value: children,
})
: children
)
);

await prepass(vNode)
await prepass(vNode);
const html = render(vNode);
return { attrs, html };
}
Expand Down

0 comments on commit 6834b3d

Please sign in to comment.