diff --git a/packages/integrations/svelte/client-v5.js b/packages/integrations/svelte/client-v5.js
index f2cc647a2be6..123e544f6176 100644
--- a/packages/integrations/svelte/client-v5.js
+++ b/packages/integrations/svelte/client-v5.js
@@ -10,7 +10,6 @@ export default (element) => {
let $$slots = undefined;
let renderFns = {};
-
for (const [key, value] of Object.entries(slotted)) {
// Legacy slot support
$$slots ??= {};
@@ -25,15 +24,15 @@ export default (element) => {
}));
}
// @render support for Svelte ^5.0
- if (key === 'default') {
- renderFns.children = createRawSnippet(() => ({
- render: () => `${value}`
- }));
- } else {
- renderFns[key] = createRawSnippet(() => ({
- render: () => `${value}`
- }));
- }
+ if (key === 'default') {
+ renderFns.children = createRawSnippet(() => ({
+ render: () => `${value}`,
+ }));
+ } else {
+ renderFns[key] = createRawSnippet(() => ({
+ render: () => `${value}`,
+ }));
+ }
}
const bootstrap = client !== 'only' ? hydrate : mount;
@@ -42,7 +41,7 @@ export default (element) => {
...props,
children,
$$slots,
- ...renderFns
+ ...renderFns,
});
} else {
const component = bootstrap(Component, {
@@ -51,7 +50,7 @@ export default (element) => {
...props,
children,
$$slots,
- ...renderFns
+ ...renderFns,
},
});
existingApplications.set(element, component);
diff --git a/packages/integrations/svelte/server-v5.js b/packages/integrations/svelte/server-v5.js
index 932a52b1ff06..a38d3826042d 100644
--- a/packages/integrations/svelte/server-v5.js
+++ b/packages/integrations/svelte/server-v5.js
@@ -18,7 +18,7 @@ async function renderToStaticMarkup(Component, props, slotted, metadata) {
let children = undefined;
let $$slots = undefined;
const renderProps = {};
-
+
for (const [key, value] of Object.entries(slotted)) {
// Legacy slot support
$$slots ??= {};
@@ -33,10 +33,10 @@ async function renderToStaticMarkup(Component, props, slotted, metadata) {
}));
}
// @render support for Svelte ^5.0
- const slotName = key === 'default' ? 'children' : key;
- renderProps[slotName] = createRawSnippet(() => ({
- render: () => `<${tagName}${key !== 'default' ? ` name="${key}"` : ''}>${value}${tagName}>`
- }));
+ const slotName = key === 'default' ? 'children' : key;
+ renderProps[slotName] = createRawSnippet(() => ({
+ render: () => `<${tagName}${key !== 'default' ? ` name="${key}"` : ''}>${value}${tagName}>`,
+ }));
}
const result = render(Component, {
@@ -44,7 +44,7 @@ async function renderToStaticMarkup(Component, props, slotted, metadata) {
...props,
children,
$$slots,
- ...renderProps
+ ...renderProps,
},
});
return { html: result.body };