diff options
author | 2022-06-23 15:12:46 +0000 | |
---|---|---|
committer | 2022-06-23 15:12:46 +0000 | |
commit | 059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625 (patch) | |
tree | 9b0d289c9fb3df8dd50eff8f6176f8117c0f6084 /packages/integrations/preact/server.js | |
parent | 7373d61cdcaedd64bf5fd60521b157cfa4343558 (diff) | |
download | astro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.tar.gz astro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.tar.zst astro-059d00bd5d4bd2b64cb7d321d1ebf9c1ba44c625.zip |
[ci] format
Diffstat (limited to 'packages/integrations/preact/server.js')
-rw-r--r-- | packages/integrations/preact/server.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/preact/server.js b/packages/integrations/preact/server.js index 31f980aa3..29ae8a3b0 100644 --- a/packages/integrations/preact/server.js +++ b/packages/integrations/preact/server.js @@ -2,7 +2,7 @@ import { h, Component as BaseComponent } from 'preact'; import render from 'preact-render-to-string'; import StaticHtml from './static-html.js'; -const slotName = str => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase()); +const slotName = (str) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase()); function check(Component, props, children) { if (typeof Component !== 'function') return false; @@ -33,7 +33,7 @@ function renderToStaticMarkup(Component, props, { default: children, ...slotted slots[name] = h(StaticHtml, { value, name }); } // Note: create newProps to avoid mutating `props` before they are serialized - const newProps = { ...props, ...slots } + const newProps = { ...props, ...slots }; const html = render( h(Component, newProps, children != null ? h(StaticHtml, { value: children }) : children) ); |