Closed Eschon closed 7 years ago
@Eschon @constancecchen I have a fix for server side rendering, it's not perfect, but if we add
// If this is being rendered on the server, return
if (typeof window === 'undefined') {
return;
}
I have tested it and it works fine with React.
@Trevomatic I've used your branch has npm source, but still not working... (needs to update the *.min.js files too)
I have just tried the fix and it works for me. Thanks @Trevomatic for taking the time to make a PR.
@constancecchen When do you plan to release a new Version that includes this fix?
Sorry for the long delay, just been super busy. I should've just published a new npm, bower, and git version that includes this fix.
I tried to use this polyfill in a react app that is rendered on the server and it fails because it can't access the document.
Right now as a workaround I require it in the componentDidMount method of the component where I use it. But this is a bit cumbersome especially if I need it in multiple components.