Skip to content

Commit

Permalink
fix: react key warning in SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
bfanger committed Dec 3, 2022
1 parent d0642a2 commit fae87ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/bfanger/svelte-preprocess-react.git"
},
"version": "0.12.0",
"version": "0.13.0",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/sveltify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ export default function sveltify<P>(
props,
[
React.createElement("svelte-slot", {
key: "svelte-slot",
style: { display: "contents" },
dangerouslySetInnerHTML: { __html: html },
}),
...current.map((child, i) =>
React.createElement(
`ssr-portal${i}`,
null,
{ key: `ssr-portal${i}` },
React.createElement(child.reactComponent, child.props)
)
),
Expand Down

0 comments on commit fae87ed

Please sign in to comment.