Skip to content

Commit 19ace51

Browse files
prettier
1 parent eb79fd5 commit 19ace51

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/hydrate/runner/render.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ function finalizeHydrate(win: MockWindow, doc: Document, opts: HydrateFactoryOpt
213213

214214
const styles = doc.querySelectorAll('head style');
215215
if (styles.length > 0) {
216-
results.styles.push(...Array.from(styles).map((style) => ({
217-
href: style.getAttribute('href'),
218-
id: style.getAttribute(HYDRATED_STYLE_ID),
219-
content: style.textContent,
220-
})));
216+
results.styles.push(
217+
...Array.from(styles).map((style) => ({
218+
href: style.getAttribute('href'),
219+
id: style.getAttribute(HYDRATED_STYLE_ID),
220+
content: style.textContent,
221+
})),
222+
);
221223
}
222224

223225
try {

src/runtime/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export { forceUpdate, getRenderingRef, postUpdateComponent } from './update-comp
1818
export { h, Host } from './vdom/h';
1919
export { insertVdomAnnotations } from './vdom/vdom-annotations';
2020
export { renderVdom } from './vdom/vdom-render';
21-
export { HYDRATED_STYLE_ID } from './runtime-constants';
21+
export { HYDRATED_STYLE_ID } from './runtime-constants';

test/end-to-end/src/miscellaneous/renderToString.e2e.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ describe('renderToString', () => {
161161
});
162162

163163
it('populates style information even if we do not render the whole document', async () => {
164-
const { styles } = await renderToString(`<scoped-car-list cars=${JSON.stringify([vento, beetle])}></scoped-car-list>`);
164+
const { styles } = await renderToString(
165+
`<scoped-car-list cars=${JSON.stringify([vento, beetle])}></scoped-car-list>`,
166+
);
165167
expect(styles.length).toBe(2);
166168
expect(styles[0].id).toBe('sc-scoped-car-list');
167169
expect(styles[0].content).toContain('.sc-scoped-car-list-h{display:block;');

0 commit comments

Comments
 (0)