Skip to content

Commit

Permalink
fix: memory leak on server
Browse files Browse the repository at this point in the history
Closes #13
  • Loading branch information
Jannick Garthen authored and Kalle Ott committed Apr 15, 2021
1 parent e185551 commit b3e260d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ const registerIconInCache = (
const iconData = parseSVG(url, svgString);

if (iconData) {
addIcon(iconData);
if (!isSSR) {
addIcon(iconData);
}
} else if (knownIcons.has(url)) {
knownIcons.delete(url);
}
Expand Down

0 comments on commit b3e260d

Please sign in to comment.