(Translated by https://www.hiragana.jp/)
hotfix: ssr issue reported on #41 (#48) · x64Bits/solid-icons@49b033c · GitHub
Skip to content

Commit

Permalink
hotfix: ssr issue reported on #41 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
x64Bits authored Jul 5, 2023
1 parent 3033368 commit 49b033c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion all_package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solid-icons-all",
"version": "1.0.9",
"version": "1.0.10",
"description": "Bundle for Solid icons explorer",
"author": "Ignacio Zsabo",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solid-icons",
"version": "1.0.9",
"version": "1.0.10",
"description": "Modern solution for use icons on SolidJS",
"author": "Ignacio Zsabo",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JSX, splitProps } from "solid-js";
import { isServer, mergeProps } from "solid-js/web";
import { isServer, mergeProps, ssr } from "solid-js/web";

type SVGSVGElementTags = JSX.SVGElementTags["svg"];

Expand Down Expand Up @@ -43,7 +43,7 @@ export function IconTemplate(iconSrc: IconTree, props: IconProps): JSX.Element {
innerHTML={iconSrc.c}
xmlns="http://www.w3.org/2000/svg"
>
{isServer && iconSrc.c}
{isServer && ssr(iconSrc.c)}
{props.title && <title>{props.title}</title>}
</svg>
);
Expand Down

0 comments on commit 49b033c

Please sign in to comment.