Skip to content

Commit

Permalink
fix rendering of slots
Browse files Browse the repository at this point in the history
  • Loading branch information
UpperCod committed Jun 27, 2022
1 parent cb3b8a5 commit ec58225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atomico/astro",
"version": "0.3.0",
"version": "0.3.1",
"description": "Atomico + Astro build support",
"publishConfig": {
"access": "public"
Expand Down
6 changes: 5 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ const SSR = {
: customElements.get(Component);
return !!Element?.props;
},
renderToStaticMarkup(Component, props, children) {
renderToStaticMarkup(Component, props, content) {
const children = [];
for (const prop in content) {
children.push(content[prop]);
}
const dom = html`<${Component} ...${props}></${Component}>`;
return { html: dom.render(children) };
},
Expand Down

0 comments on commit ec58225

Please sign in to comment.