-
-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global is undefined #42
Comments
That's a webpack issue, brace is only meant to be used with browserify and run client side. |
I am using webpack on the client side only. Also, this is not about fix the defect only, but a defensive coding style. You have to make sure the global is defined before calling global.document. This will make this wonderful package work with webpack which is much more popular then browserify. Thanks for your consideration. |
@stevehu you do realize that this code is just pulled in from Ace right? |
@thlorenz Sorry. I didn't realize that it is in Ace codebase. I am opening an issue over there. Thanks for all the work you have done. I am using it but with my customized version installed from github:) |
No worries, I had a feeling you weren't aware of that ;) |
I am using brace from react-ace on Chrome browser with webpack and my app is broken due to global is undefined. You can reproduce it with my project https://github.com/networknt/react-schema-form
Then hit the url from your browser.
http://localhost:8080/webpack-dev-server/
The line of code failed.
Here is the line of the code I have changed as a work around. Just check if global is undefined before calling global.document.
Does anyone know what is wrong? Is there any better workaround? Can this be fixed in the next release?
Thanks.
The text was updated successfully, but these errors were encountered: