Skip to content

Commit f5eb480

Browse files
author
Kalle Ott
committed
fix: correctly identify SSR environments
1 parent 76e867b commit f5eb480

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Kalle Ott",
99
"url": "https://github.com/kaoDev/"
1010
},
11-
"version": "1.0.0",
11+
"version": "1.0.1",
1212
"main": "dist/index.js",
1313
"module": "dist/react-lazy-svg.esm.js",
1414
"typings": "dist/index.d.ts",

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export const Icon: FC<{ url: string } & React.SVGProps<SVGSVGElement>> = ({
173173
}) => {
174174
const { registerSVG } = useContext(spriteContext);
175175

176-
if (typeof document !== 'undefined') {
176+
if (typeof document === 'undefined') {
177177
registerSVG(url);
178178
} else {
179179
useEffect(() => {

0 commit comments

Comments
 (0)