From 75e1deafe00d4317a1d48ca8d50f7e054850a384 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Wed, 18 Dec 2024 23:18:49 +0100 Subject: [PATCH] add to legacy wrapper --- packages/svelte/src/legacy/legacy-server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/legacy/legacy-server.js b/packages/svelte/src/legacy/legacy-server.js index 60bd8c9fc6..7eead7db77 100644 --- a/packages/svelte/src/legacy/legacy-server.js +++ b/packages/svelte/src/legacy/legacy-server.js @@ -21,14 +21,15 @@ export { createClassComponent }; */ export function asClassComponent(component) { const component_constructor = as_class_component(component); - /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map; }) => { html: any; css: { code: string; map: any; }; head: string; } } */ + /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map; }) => { html: any; css: { code: string; map: any; }; head: string; htmlAttributes: string } } */ const _render = (props, { context } = {}) => { // @ts-expect-error the typings are off, but this will work if the component is compiled in SSR mode const result = render(component, { props, context }); return { css: { code: '', map: null }, head: result.head, - html: result.body + html: result.body, + htmlAttributes: result.htmlAttributes }; }; // @ts-expect-error this is present for SSR