Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document not defined #26

Open
romarybi opened this issue Jun 30, 2020 · 1 comment
Open

Document not defined #26

romarybi opened this issue Jun 30, 2020 · 1 comment

Comments

@romarybi
Copy link

Font-picker is used as a dependency in react-font-picker. Building the project fails due to document not being defined at build time. You need to wrap lines 158-159 of index.es.js as

if(typeof document !== 'undefined'){
    var previewFontsStylesheet = document.createElement("style");
    document.head.appendChild(previewFontsStylesheet);
}
@romarybi
Copy link
Author

I'm happy to submit a PR

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant