Skip to content

Commit

Permalink
Fix for use with SSR frameworks like Remix
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwells committed Feb 5, 2023
1 parent 7980720 commit cabdb21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const classes = ${classNames};
const css = \`${result.css}\`;
${options.inject && `
(function() {
if (!document.getElementById(digest)) {
if (typeof document !== "undefined" && !document.getElementById(digest)) {
var ele = document.createElement('style');
ele.id = digest;
ele.textContent = css;
Expand Down

0 comments on commit cabdb21

Please sign in to comment.